markdown-toc icon indicating copy to clipboard operation
markdown-toc copied to clipboard

Document with literal `---` or single horizontal rule at top is mangled

Open gregdan3 opened this issue 2 years ago • 0 comments

Bug

If a document with --- at the top is provided, an extra --- will be written to the document because the leading --- is detected as a frontmatter.

Reproducer

---

Example!

Expected Result

---

Example!

Actual Result

---
Example!
---


Trailing newlines intended; see #180

gregdan3 avatar Sep 17 '23 22:09 gregdan3