ghost-paper 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +2 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -219,7 +219,7 @@ function parse(markdown) {
219
219
  const nodes = tree.children.filter((n) => n.type !== "yaml");
220
220
  const h1Count = nodes.filter((n) => n.type === "heading" && n.depth === 1).length;
221
221
  const h2Count = nodes.filter((n) => n.type === "heading" && n.depth === 2).length;
222
- const tabDepth = h1Count <= 1 && h2Count >= 2 ? 2 : 1;
222
+ const tabDepth = h1Count === 0 && h2Count >= 2 ? 2 : 1;
223
223
  const sectionDepth = tabDepth + 1;
224
224
  const tabs = [];
225
225
  let currentTab = null;
@@ -507,7 +507,7 @@ function barChartJs(chartId, table) {
507
507
  const values = table.rows.map((r) => parseNumericValue(r[numColIndex]) ?? 0);
508
508
  const fmt = detectFormat(table.rows.map((r) => r[numColIndex]));
509
509
  const maxLabelLen = Math.max(...categories.map((c) => c.length));
510
- const leftMargin = Math.min(200, Math.max(80, maxLabelLen * 7 + 12));
510
+ const leftMargin = Math.min(300, Math.max(80, maxLabelLen * 8 + 16));
511
511
  return `
512
512
  (() => {
513
513
  var chart = makeChart(${JSON.stringify(chartId)});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ghost-paper",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Turn markdown into beautiful HTML reports",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",