@speajus/markdown-to-pdf 1.0.10 → 1.0.11

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.
package/README.pdf CHANGED
Binary file
package/dist/renderer.js CHANGED
@@ -589,6 +589,17 @@ async function renderMarkdownToPdf(markdown, options) {
589
589
  renderTextWithEmoji(t.text);
590
590
  }
591
591
  headingCtx = null;
592
+ // Draw an underline beneath h1 and h2
593
+ if (t.depth <= 2) {
594
+ const lineY = doc.y + 2;
595
+ doc.save();
596
+ doc.strokeColor(theme.horizontalRuleColor).lineWidth(t.depth === 1 ? 1.5 : 1)
597
+ .moveTo(margins.left, lineY)
598
+ .lineTo(margins.left + contentWidth, lineY)
599
+ .stroke();
600
+ doc.restore();
601
+ doc.y = lineY + 2;
602
+ }
592
603
  doc.moveDown(spaceBelow / doc.currentLineHeight());
593
604
  resetBodyFont();
594
605
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speajus/markdown-to-pdf",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "A new project created with Intent by Augment.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",