Skip to content

v0.4.3

Choose a tag to compare

@edadma edadma released this 07 May 13:35
· 22 commits to stable since this release

Highlights

  • New: auto-generated heading IDs. Set MarkdownConfig.autoHeadingIds = true to have every <hN> get an id attribute slugified from its text content. The slugify function is pluggable; the default matches Hugo / mkdocs / GitHub.
  • New: AST-consumer helpers. Document.headings, public renderInlines, public plainText — 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, exposing renderToHTML / 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_platform 0.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