v0.4.3
Highlights
- New: auto-generated heading IDs. Set
MarkdownConfig.autoHeadingIds = trueto have every<hN>get anidattribute slugified from its text content. Theslugifyfunction is pluggable; the default matches Hugo / mkdocs / GitHub. - New: AST-consumer helpers.
Document.headings, publicrenderInlines, publicplainText— the bits TOC builders, anchor-text generators, and search-index excerpters keep reinventing. - New: npm package
@edadma/markdown. The linked Scala.js bundle plus full TypeScript typings, exposingrenderToHTML/extractHeadings/plainText/version. ESM, types pointer, drop-in for any JS / TS project. - Fix: setext heading vs fenced code precedence. A line that opens a fenced code block (```` or
~~~) is no longer incorrectly claimed as a setext heading when the next line is `---`. Surfaced when feeding YAML-style frontmatter inside fenced examples to the parser. - Fix:
String.replace("\\u0000", ...)on Scala Native. The CharSequence overload couldn't handle the null byte (C-string terminator). Now uses the(Char, Char)overload — Native test suite is fully green for the first time. - Bump:
cross_platform0.1.3 → 0.1.6 (transitive); plugin / sbt refresh.
Test sweep
994 / 994 active green on JVM, Scala.js, and Scala Native. All 652 official CommonMark 0.31.2 spec tests still pass plus the expanded local suite (helpers, auto heading IDs, setext-vs-fence regressions).
Install
Scala (sbt)
libraryDependencies += "io.github.edadma" %%% "markdown" % "0.4.3"JavaScript / TypeScript (npm)
npm install @edadma/markdown