Skip to content

Latest commit

 

History

History
687 lines (476 loc) · 73.9 KB

CHANGELOG.md

File metadata and controls

687 lines (476 loc) · 73.9 KB

satteri

0.11.6 — 2026-10-28

Patch changes

  • e20efd7 Fixed the tree functions and plugins failing in the browser with a Buffer error. — Thanks @Princesseuh!

0.11.5 — 2026-10-27

Patch changes

  • ae6c881 Fixed the package failing to load because its native bindings were not installed with it. — Thanks @Princesseuh!

0.11.4 — 2026-10-27

Patch changes

  • 3df0ea8 Fixed 0.11.1 and 0.11.3 failing to load because their native bindings were not installed with them. — Thanks @Princesseuh!

0.11.3 — 2026-10-27

Patch changes

  • c472f43 Fixed a code block losing its meta when a plugin sets data.hChildren on it. — Thanks @Princesseuh!
  • c472f43 Fixed plugins that hand nodes back becoming very slow on documents with long lines. — Thanks @Princesseuh!
  • a102233 Fixed 0.11.1 failing to load because its native bindings were not installed with it. — Thanks @Princesseuh!
  • c472f43 Fixed a brace inside a quoted attribute value, such as {title="a{b"}, stopping the attributes from applying to a fenced code block, paragraph or table cell. — Thanks @Princesseuh!
  • c472f43 Fixed braces written as character references, such as {.a}, being read as a fenced code block's attributes. — Thanks @Princesseuh!

0.11.2 — 2026-10-26

Patch changes

  • 1be47fb Added the attributes feature, which reads {...} attributes on fenced code blocks (```js {.class #id}) as well as on headings. — Thanks @Saeris!
  • 99e7ab5 Added inline elements to the attributes feature: a {...} right after emphasis, strong, a code span, a link, an image or strikethrough (*em*{.class}) applies to it. — Thanks @Saeris!
  • 7db3e86 Added blocks to the attributes feature: a {...} ending a paragraph, list item, table cell or definition list entry applies to it, and one on a line of its own applies to the block it follows. — Thanks @Saeris!
  • 4ef9200 Fixed data.hName, data.hProperties and data.hChildren on a code block applying to its <pre> instead of its <code>. — Thanks @Saeris!
  • c6cbc06 Fixed data.hName, data.hProperties and data.hChildren being ignored on table rows and cells. — Thanks @Saeris!
  • d95c76c Changed definition list terms to fit on one line, so a : marker after a paragraph of several lines no longer makes each line a term. — Thanks @Saeris!
  • beae7c9 Fixed nodes a plugin passes back losing their position: a spread copy of a node, or a custom node given a position, now keeps it for the plugins after it. — Thanks @Saeris!
  • 1be47fb Deprecated the headingAttributes feature in favor of attributes, which reads heading attributes as well as attributes on other elements. headingAttributes keeps working. — Thanks @Saeris!
  • fc432e5 Added features to the plugin factory context, so a plugin can compile a fragment with the same syntax as the document: markdownToMdast(fragment, { features: ctx.features }). — Thanks @Saeris!

0.11.1 — 2026-10-26

Patch changes

  • 04dffbe Fixed the 0.11.0 release, which never reached npm. — Thanks @Princesseuh!

0.11.0 — 2026-10-26

Minor changes

  • 81be9ae Added ctx.setField for a node's own fields and ctx.setAttribute for attributes entries, so plugins can now rename elements, MDX JSX elements and directives, and set directive attributes. ctx.setProperty keeps setting HAST element properties; using it for fields or MDX JSX attributes is deprecated, and it is deprecated outright on MDAST. — Thanks @Princesseuh!

  • 6a66463 A node read from the tree and handed back to insertBefore, insertAfter, prependChild, appendChild, insertChildAt or replaceNode, or returned from a visitor, is now that node rather than a snapshot of how it looked when you read it, so it arrives carrying every change the pass made to it. This is how reused children already behaved when nested inside new content, and it means an inserted node no longer silently misses a transform another visitor queued on it in the same pass. Pass structuredClone(node) during its visitor pass when you want a detached copy instead; a node from another tree or pass cannot be inserted as a reference.

    Two shapes have no answer under that rule and now report an error when queued edits are applied, instead of quietly inserting a stale copy: inserting a node inside itself, as insertAfter(node, ctx.parent(node)) does, and swapping or sorting siblings with a pair of inserts that each name the other's node. Reorder by handing the parent the order you want, with setProperty(parent, "children", [...]). — Thanks @Princesseuh!

Patch changes

  • e72e72f Fixed data.hProperties and data.hChildren being ignored on the last paragraph of a footnote. — Thanks @Princesseuh!

  • 897072d Fixed raw MDAST content adding paragraph wrappers in phrasing-content mutations. — Thanks @Princesseuh!

  • 5a49ee3 Improved MDAST and HAST plugin performance for visitors, full-tree traversal, and small documents. — Thanks @Princesseuh!

  • f74fa8f Fixed setProperty for MDX JSX attributes — Thanks @Princesseuh!

  • af7e7ed Made position: false faster and fixes cases were it could lower performance by accident compared to enabling positions. — Thanks @Princesseuh!

  • 371b584 Added Android ARM64 native binding support. — Thanks @dcavalcante for your first contribution 🎉!

  • d4be776 Fixed SVG script and style text being corrupted and elements with HTML void-element names losing children or absorbing siblings during HTML serialization and rawHtml reparsing. HTML content inside SVG integration points keeps its normal serialization rules, including with optimizeStatic. — Thanks @gtritchie!

  • af7e7ed Made parsing, HTML rendering, and tree building faster, by 3% to 35% depending on the document and output, with the largest gains on small documents. — Thanks @Princesseuh!

  • a12138b Fixed markdownToMdast and mdxToMdast return types to Root — Thanks @Princesseuh!

  • af7e7ed Made markdownToMdast, markdownToHast, and the MDX tree functions faster and less memory-hungry, with the largest gains on text-heavy and non-ASCII documents. — Thanks @Princesseuh!

  • 73ba4b0 Added the MdastVisitorFn and HastVisitorFn type exports, so a visitor shared by several node types can be typed once, for example MdastVisitorFn<Paragraph | Blockquote>. — Thanks @dgesteves for your first contribution 🎉!

  • 4171b78 Fixed list-valued properties on HAST elements: numeric items (like coords) no longer disappear, lists are separated by comma or space according to the schema of the element they sit in, and a comma-separated attribute parsed from HTML round-trips unchanged. — Thanks @Princesseuh!

  • 5a49ee3 Improved Markdown parsing, HAST conversion, and HTML rendering performance for prose, tables, links, autolinks, code spans, and strong emphasis. Reduced unnecessary allocations when compiling MDX with configured ignored elements, and fixed panics and incorrect strong-emphasis output when an autolink immediately follows an inline link.

    Changed Rust tree APIs to use Document for both borrowed and owned source text, with NodePosition arguments for construction and position setters. JavaScript APIs and wire layouts are unchanged. — Thanks @Princesseuh!

  • f74fa8f Fixed ctx.setField for structured fields, including MDX JSX and directive attributes, table alignment, and HAST element properties. For example, ctx.setField(node, "attributes", []) now clears an MDX JSX element's attributes while preserving its children. — Thanks @Princesseuh!

  • 036507d Fixed raw HTML MathML default namespace attributes being serialized as :xmlns instead of xmlns. — Thanks @odysseus0 for your first contribution 🎉!

  • 565f6d4 Fix tables consuming directive closing fences — Thanks @Princesseuh!

  • 6a66463 Fixed structuredClone throwing on a node read from the tree, and stopped internal fields riding along on a clone or a spread copy of one. — Thanks @Princesseuh!

  • 9b7688f Added a native binding for FreeBSD x64. — Thanks @Princesseuh!

  • 5a49ee3 Improved MDAST and HAST visitor performance, especially for text-heavy plugins. Retaining HAST visitor nodes after compilation can use more memory. — Thanks @Princesseuh!

  • bbe6744 Require MDAST and HAST plugin definitions to declare at least one visitor or lifecycle hook. — Thanks @Princesseuh!

  • d4be776 Fixed rawHtml losing the SVG attribute schema for raw HTML inside a JSX <svg> element, so fill-rule now maps to fillRule instead of passing through as an unknown property. — Thanks @gtritchie!

  • af7e7ed Fixed list and list-item nodes sometimes having corrupted values — Thanks @Princesseuh!

  • 4171b78 Fixed text inside an element nested in <script> or <style> rendering unescaped; only text directly inside those elements is left as-is. — Thanks @Princesseuh!

  • a612576 Fixes numbered instructions after indented code examples rendering as plain text when numbering starts above 1. — Thanks @Princesseuh!

  • 4171b78 Added hastToHtml, which serializes a HAST tree, a single node, or a list of nodes back to an HTML string, the reverse of htmlToHast. — Thanks @Princesseuh!

  • b2e7533 Added plugin support to the tree functions: markdownToMdast and mdxToMdast accept mdastPlugins, and markdownToHast and mdxToHast accept both mdastPlugins and hastPlugins, alongside fileURL and data as the compile functions already do.

    const tree = markdownToHast(source, {
      mdastPlugins: [myMdastPlugin],
      hastPlugins: [myHastPlugin],
    });

    As with markdownToHtml, an async plugin makes the call return a promise. — Thanks @Princesseuh!

  • 597ed59 Fixed the default elementAttributeNameCase: "react" compiling the SVG datatype attribute to data-type. It now emits datatype, while custom data-* attributes on SVG and HTML elements are still kebab-cased. — Thanks @gtritchie!

  • 0c2c869 Fixed raw MathML children inside MDX elements being parsed as HTML. — Thanks @Princesseuh!

  • c522b99 Fixes missing exports for custom MDAST, HAST, and MDX node types. — Thanks @Princesseuh!

  • 2a9ad06 Fixes empty titles appearing in rendered output when a directive has an empty label. — Thanks @Princesseuh!

0.10.5 — 2026-08-19

Patch changes

  • 393aed7 Fixed satteri failing to load on Apple Silicon macOS and musl Linux x64, where the native bindings were missing from the 0.10.4 release. — Thanks @Princesseuh!

0.10.4 — 2026-08-19

Patch changes

  • 72d4710 Fixed plugin-inserted elements being emitted as literal JSX tags, instead of going through _components, when another plugin-inserted node was marked as explicit JSX. — Thanks @Princesseuh!

0.10.3 — 2026-08-19

Patch changes

  • 1a052cf Improved performance. — Thanks @Princesseuh!
  • 2cf9aef Added clobberPrefix option to footnotes, mirroring remark-rehype — Thanks @Princesseuh!

0.10.2 — 2026-08-18

Patch changes

  • c363b97 Fixed text being dropped when one paragraph held two footnote references whose identifier contains a backtick, or a $ with the math feature enabled. The words between the two references, and the second reference itself, are no longer swallowed. — Thanks @Princesseuh!
  • c363b97 Fixed the footnote back-reference link landing inside an earlier paragraph when the definition ends in a list, code block, blockquote, table, or heading. It is now appended after that last block, as remark and GitHub do. — Thanks @Princesseuh!
  • 003158b Added visitMdastHook, visitHastHook and normalizePlugins to the exports, so a hand-driven plugin pipeline can run before/after hooks and resolve plugin factories the way markdownToHtml does. The diagnostic and hook types (MdastDiagnostic, HastDiagnostic, MdastHookFn, HastHookFn) are exported alongside them. — Thanks @Princesseuh!
  • c363b97 Fixed footnote links and IDs for identifiers containing non-ASCII characters or URL punctuation, which are now percent-encoded. [^café] links to #user-content-fn-caf%C3%A9, and an identifier holding a bare % no longer produces an invalid URL. — Thanks @Princesseuh!

0.10.1 — 2026-08-18

Patch changes

  • 1b09752 Added { fragment: true } to htmlToHast, which parses the string as a fragment so the returned root holds its own top-level nodes instead of an implied <html>/<head>/<body>.

    Pass space: "svg" alongside it to read the fragment as foreign content, so <circle /> self-closes and camel-cased tags like clipPath keep their casing instead of parsing as unknown HTML elements.

    import { htmlToHast } from "satteri";
    
    const tree = htmlToHast("<p>hi</p>", { fragment: true });
    // { type: "root", children: [{ type: "element", tagName: "p", ... }] }
    
    const icon = htmlToHast(`<circle cx="1" />`, { fragment: true, space: "svg" });

    — Thanks @Princesseuh!

0.10.0 — 2026-08-18

Minor changes

  • 137ff48 Nodes handed to plugins are shared and now frozen: writing to a node's fields, position, properties/attributes, or children throws a TypeError instead of silently corrupting what later plugins see; go through the context methods to make changes.

    Keeping a node around after your visitor ran now works: it reads as the tree looked at that moment, instead of always throwing. The error only remains if you never read the node's content before the tree changed. Trees returned by markdownToMdast/mdxToMdast/markdownToHast/mdxToHast are your own data and stay fully mutable. — Thanks @Princesseuh!

  • e53e725 Added a way to run a plugin only on some documents: a plugin factory now receives the file's fileURL, sourceFormat, source and data, and can return null, undefined or false to be left out for that document. Those skip values are also accepted anywhere a plugin entry can appear.

    const onlyChangelogs = (ctx) =>
      ctx.fileURL?.pathname.endsWith("/CHANGELOG.md") ? rewriteVersions : null;
    
    markdownToHtml(source, { mdastPlugins: [onlyChangelogs, myPlugin] });

    Anything else in a plugin list now fails with an error naming the option and what it expected. — Thanks @Princesseuh!

  • 2b85f56 Adds { raw } support to wrapNode() in HAST plugins: the HTML is parsed and the node is wrapped in the resulting element. — Thanks @Princesseuh!

  • d8b7172 Adds a definitionList feature (off by default) that renders definition lists to <dl>/<dt>/<dd>.

    New descriptionList / descriptionTerm / descriptionDetails nodes are available to plugins when this option is enabled.

    Apple
    :   Pomaceous fruit.
    :   A tech company.
    

    — Thanks @lolifamily for your first contribution 🎉!

  • d8639d6 Added a rawHtml feature that reparses raw HTML embedded in Markdown into real HAST nodes. Enable it with features: { rawHtml: true } on any entry point; it is applied during the MDAST→HAST conversion, so markdownToHast, markdownToHtml, and the plugin pipelines all reparse identically, and hast plugins always see the reparsed elements.

    The whole tree is reparsed through the HTML parser, so a tag opened in one raw block and closed in another is resolved against the surrounding Markdown. Attributes are normalized into typed hast properties (class → className: [...], disabled → true, tabindex → number, data-foo-bar → dataFooBar). htmlToHast normalizes properties the same way.

    MDX nodes are passed through the reparse rather than dropped: each JSX element/expression is preserved in place while the surrounding raw HTML is still resolved around it. So mdxToHast(source, { features: { rawHtml: true } }) keeps its MDX content.

    import { markdownToHast } from "satteri";
    
    const tree = markdownToHast(`<div class="note">\n\n**hi**\n\n</div>`, {
      features: { rawHtml: true },
    });
    // <div> is a real element wrapping <p><strong>hi</strong></p>

    — Thanks @IEvangelist for your first contribution 🎉!

  • 166419c Added markdownToJs, the plain-Markdown counterpart to mdxToJs: MDX syntax like {...} stays literal text.

    import { markdownToJs } from "satteri";
    
    const { code } = markdownToJs("Hello {world}");

    HTML in the source is dropped. Pass features: { rawHtml: true } to parse it into real elements instead. — Thanks @Princesseuh!

  • eeb7f07 Source positions are now opt-in per plugin via options: { position: true }, and node.position is undefined in visitors otherwise. — Thanks @Princesseuh!

  • c9ea0c9 Adds user-defined MDAST node types. A plugin can create a node with any type string, render it as an element through data.hName (or as text from a value), and reach every one of them from the new custom visitor key. Content nested inside a custom node stays visible to other plugins and to the HTML output. — Thanks @Princesseuh!

  • 8df3f76 Added support for nested arrays in mdastPlugins and hastPlugins, so a package can export a bundle of plugins that you pass without spreading it. A bundle's plugins run in their own order, at the bundle's position. A factory can return a bundle as well as a single plugin, giving its plugins state they share with each other and reset per document.

    import { typography } from "some-package"; // an array of plugins
    
    markdownToHtml(source, { mdastPlugins: [typography, myPlugin] });

    — Thanks @Princesseuh!

  • 53fa9a9 ctx.replaceNode(node, newNode) now accepts an array of nodes as well as a single node, matching insertBefore, insertAfter, prependChild, appendChild and insertChildAt. The nodes take the target's place in order, so ctx.replaceNode(node, [a, b]) leaves a and b where node was. This works on both the MDAST and HAST visitor contexts. — Thanks @Princesseuh!

  • 2ac113e Added position: false to markdownToMdast, mdxToMdast, markdownToHast, and mdxToHast, which skips recording node.position. On a 1 MB document that halves both the time to build a tree and the memory it occupies, so it is worth passing whenever nothing downstream reads positions.

    const tree = markdownToMdast(source, { position: false });

    — Thanks @Princesseuh!

  • 63fbb77 Plugins now splice strings with a single shape, { raw: string, mdxExpressions?: boolean }, accepted by visitor return values and every structural mutator (replace, insertBefore, insertAfter, prependChild, appendChild, wrapNode). The string is re-parsed in place of the node.

    mdxExpressions (default true) controls what {…} means when the document is MDX: live expressions by default, or literal text with mdxExpressions: false — the right choice when injecting generated HTML whose braces are not expressions, like a Mermaid decision node C{JWT valid?} or math renderer output. Plain Markdown has no expressions, so the option is a no-op there.

    { rawHtml: string } is deprecated; it keeps working and behaves exactly like { raw, mdxExpressions: false }.

    defineMdastPlugin({
      code(node) {
        if (node.lang !== "mermaid") return;
        return { raw: renderMermaid(node.value), mdxExpressions: false };
      },
    });

    — Thanks @Princesseuh!

  • d8639d6 Added htmlToHast, which parses an HTML string into a HAST tree (elements, text, comments, doctype) with the same spec-compliant parsing a browser does. The result is a root wrapping the implied <html> subtree.

    import { htmlToHast } from "satteri";
    
    const tree = htmlToHast("<p>hi</p>");
    // { type: "root", children: [{ type: "element", tagName: "html", ... }] }

    — Thanks @IEvangelist for your first contribution 🎉!

  • 6050fc4 Adds before/after lifecycle hooks to plugins that run exactly once per document. — Thanks @Princesseuh!

Patch changes

  • ac99c4f Improved HTML rendering performance with faster character escaping. — Thanks @Princesseuh!

  • 5a581ad Fixed a line holding only a vertical tab or form feed counting as a blank line, which split paragraphs and let a definition run past its destination. — Thanks @Princesseuh!

  • ac99c4f Improved Markdown to HTML performance when no HAST plugins run and nothing sets hName, hProperties, or hChildren (which heading attributes do). — Thanks @Princesseuh!

  • 88fbb7e Fixes a crash in the browser and bundler builds where loading Sätteri could fail with WebAssembly.Compile is disallowed on the main thread, if the buffer size is larger than 4KB. The WebAssembly module now initializes asynchronously instead of compiling synchronously on the main thread. — Thanks @Princesseuh!

  • ac2b172 Fixed GFM autolinks sometimes missing position information, such as a bare URL after an unclosed [. — Thanks @Princesseuh!

  • c9985d9 Fixed development: true line and column numbers, missing-component references, and MDX parse error locations being wrong in documents with multibyte or emoji characters. — Thanks @Princesseuh!

  • f868e26 Fixed React-cased SVG property names like strokeLinecap and strokeLinejoin leaking into HTML output as-is instead of serializing as stroke-linecap / stroke-linejoin. — Thanks @gtritchie!

  • 7441ecd Fixed a defined footnote reference like [^x](y) parsing as a link instead of a footnote reference followed by text. — Thanks @Princesseuh!

  • 7e9ac4c Fixed very deeply nested documents crashing the process instead of compiling. — Thanks @Princesseuh!

  • a27c06d Fixed MDX expressions failing to parse when a string inside them is continued over a CRLF line ending with a backslash. — Thanks @Princesseuh!

  • ac99c4f Improved parsing performance for documents with few or no autolink candidates. — Thanks @Princesseuh!

  • ac2b172 Fixed a bare URL or email not linking when a character reference supplies its first character, as in &#104;ttp://example.com. — Thanks @Princesseuh!

  • a27c06d Fixed MDX line comments and import/export blocks swallowing the lines after them in files that use lone carriage returns as line endings. — Thanks @Princesseuh!

  • 137ff48 Editing a node that belongs to a different document (a node kept from a previous compile, or an mdast node used in a hast plugin) now fails the compile with invalid node id. A few pathological edits now throw unsupported patch shape, most notably replacing a node with new content that reuses that same node while another plugin edits something inside it in the same pass, and inserting a sibling next to the root.

    Edits to nodes that another plugin removed in the same pass are still just dropped with a warning, and replacing, removing, or wrapping the root keeps working. — Thanks @Princesseuh!

  • d6dbbad Fixed an email overlapping a www. link swallowing the link, like user@www.example.org after an unclosed bracket. — Thanks @Princesseuh!

  • be2c1a1 Fixed emphasis being parsed around a ~ when GFM is disabled, so a*~* now stays plain text. — Thanks @Princesseuh!

  • a27c06d Fixed GFM autolinks losing their positions when smart punctuation is enabled. — Thanks @Princesseuh!

  • 18d123b Fixed a { inside an MDX link destination or title raising a parse error when the link tail spans more than one line, as in [a](/u\n"ti{tle"). — Thanks @Princesseuh!

  • 5a581ad Fixed a vertical tab or form feed at the end of a line being dropped from the text. — Thanks @Princesseuh!

  • 39bc97f Fixed a Promise in a plugin list being silently ignored instead of failing with a clear error, and gave malformed hast element visitors a real error message. — Thanks @Princesseuh!

  • 5c4cd17 Fixed elementAttributeNameCase: "html" leaving a nested <svg> element's own React-cased attributes (like strokeWidth) unconverted on the MDX compile path; the SVG schema now covers the <svg> element itself, not just its descendants. — Thanks @gtritchie!

  • ac2b172 Fixed inline code ending at the wrong backtick when its content looks like a URL. — Thanks @Princesseuh!

  • a27c06d Fixed emphasis and character references being lost after a GFM autolink whose URL ends in a backslash. — Thanks @Princesseuh!

  • 9094edd Improved markdownToMdast and markdownToHast performance by reading each node from the wire buffer once while building the tree. — Thanks @Princesseuh!

  • eeb7f07 Faster parsing, MDX compilation, and plugin execution. — Thanks @Princesseuh!

  • f0c24d7 Improved HAST property types in plugins: node.properties.href, className, start and every other known property are now typed individually, so reading one no longer needs a typeof guard to narrow it.

    element: {
      filter: ["a"],
      visit(node, ctx) {
        if (node.properties.href?.startsWith("http")) {
          // ...
        }
      },
    }

    — Thanks @Princesseuh!

  • 2ac113e Walking a tree from markdownToMdast, mdxToMdast, markdownToHast, mdxToHast, or htmlToHast is roughly 4x faster. — Thanks @Princesseuh!

  • 1126ad0 Fixed a tight definition list gluing a definition's continuation paragraph onto the first block with no separator. — Thanks @Princesseuh!

  • 5a581ad Fixed a vertical tab or form feed standing in for a space in an ATX heading opener, a task list marker, an HTML tag, or a link or footnote label. — Thanks @Princesseuh!

  • 6a1eaec Fixed wrapNode() not accepting the { raw } shape that every other structural mutator takes. — Thanks @Princesseuh!

  • 204fb3a Fixed documents with many unclosed parenthesized link titles taking quadratic time to parse. — Thanks @Princesseuh!

  • a27c06d Fixed a zero-width no-break space being dropped when it starts a text value. — Thanks @Princesseuh!

  • 166419c Fixed jsx: true output not saying which JSX runtime to use, so a bundler compiling the JSX ignored jsxImportSource and the pragma options. — Thanks @Princesseuh!

  • c16f684 Fixes an issue with MDAST plugin visitors receiving undefined instead of an empty array for the children property of empty parent nodes. — Thanks @HiDeoo!

  • 35913b9 Fixed compiles that produced very large plugin output permanently retaining tens of megabytes of buffer memory. — Thanks @Princesseuh!

  • 2e3ed23 Faster Markdown-to-HTML rendering, most noticeably on prose-heavy documents where GFM autolink scanning dominated: a 200KB CommonMark document renders about 7% faster end to end. — Thanks @Princesseuh!

  • 3068358 Fixed compile results being typed as synchronous when options come through a variable typed as the general options interface. — Thanks @Princesseuh!

  • 64f3d5f Fixes inline code being mangled when it contains directive-like syntax. With directives enabled, writing something like `:foo[` followed by more inline code no longer merges the two code spans or drops a backtick: a : inside a code span is now treated as literal text, so you can safely show directive syntax in code. — Thanks @Princesseuh!

  • ac2b172 Fixed a www. URL linking when the character right before it is U+0085, which does not separate words. — Thanks @Princesseuh!

  • ac2b172 Fixed GFM autolinks getting the wrong URL, or being dropped entirely, when a [ earlier in the paragraph belongs to a code span, inline HTML, a pointed autolink, or a link that never resolves. — Thanks @Princesseuh!

  • a27c06d Fixed text being dropped when an MDX expression contains the ] that ends a reference label. — Thanks @Princesseuh!

  • 7e28d6c Fixed a :directive after an invalid bare URL being destroyed instead of parsed, as in http://my_app.localhost:3000/admin. — Thanks @Princesseuh!

  • 166419c Fixed development: true leaving out the line and column of elements that came from Markdown rather than from JSX written by hand. — Thanks @Princesseuh!

  • 9094edd Improved parsing performance for documents with many link reference definitions inside lists or blockquotes. — Thanks @Princesseuh!

  • 47768aa Fixed whitespace between adjacent components disappearing in MDX compiled with static optimization enabled. — Thanks @Princesseuh!

  • abe1ee9 Fixed a hard line break inside an image label adding a stray newline to the image's alt text. — Thanks @Princesseuh!

  • 8df3f76 Fixed markdownToHtml, mdxToJs and markdownToJs being typed as synchronous when a plugin list mixed sync and async plugins. The result is now correctly typed as a Promise. — Thanks @Princesseuh!

  • 9a164f1 Fixes footnotes being ignored inside directives. A footnote reference nested in a rendered directive (e.g. :::note … [^id] … :::) now works like anywhere else (it renders as a footnote link and its definition appears in the footnotes section) instead of being left as literal [^id] text. — Thanks @Princesseuh!

  • 2b85f56 Fixed wrapNode() silently misplacing or dropping the node when given a parent that cannot hold children: an html node, a leaf-shaped custom node, or a void element like <img>. These now throw an error explaining what to use instead, and parentNode only accepts parent-capable nodes in TypeScript, so most of them are caught before running.

    Wrapping in a container is unchanged: blockquote and friends, a HAST element, an MDX JSX element, a custom node declaring a children array, and the root itself all keep working. — Thanks @Princesseuh!

  • 46e2572 Fixed a { inside an MDX link destination or title raising a parse error when the tail holds an escaped or quoted ), as in [a](\){), and stopped a link tail forming from a [ that is backslash-escaped, inside a code span, already wrapped by another link, or in an earlier block. — Thanks @Princesseuh!

  • 58add58 Fixed nodes created from raw string splices reporting garbage positions; they now report no position, like other plugin-created nodes. — Thanks @Princesseuh!

  • 9bb585d Fixed edits to a node another plugin removed being dropped silently instead of with the documented warning. — Thanks @Princesseuh!

  • 9094edd Improved parsing performance for documents with paragraphs inside lists, blockquotes, and other containers. — Thanks @Princesseuh!

  • 2c14a38 Fixed links and reference definitions whose parenthesized title holds an unescaped (, as in [a](* (()), not being parsed as links, and in MDX a { inside such a title no longer raises a parse error. — Thanks @Princesseuh!

  • ac2b172 Fixed two bare URLs separated by a ] being merged into one over-long link, as in [www.a.com]www.b.com. — Thanks @Princesseuh!

  • ac2b172 Fixed a bare URL swallowing the text after it when the two are separated by a non-breaking space or other Unicode whitespace. — Thanks @Princesseuh!

  • 9094edd Improved MDX to JavaScript compilation performance. — Thanks @Princesseuh!

  • acee492 Fixed a link title being accepted with no whitespace after a <...> destination, so [a](<u>"t") is now plain text like in remark. — Thanks @Princesseuh!

  • 6696c1c Fixed position offsets being wrong in documents with multibyte characters. — Thanks @Princesseuh!

  • 291369a Fixed edits to a node kept from a previous compile silently changing an unrelated node instead of failing with invalid node id. — Thanks @Princesseuh!

  • abe1ee9 Fixed documents that use standalone carriage returns (\r) as line endings parsing differently from documents that use \n. Values such as inline code and definition titles now keep the document's own line endings instead of always reporting \n. — Thanks @Princesseuh!

  • fdaa021 Fixed a node losing its position when an async HAST visitor returns a new text value. — Thanks @Princesseuh!

  • 5a581ad Fixed the start offset of text in a table cell when it begins with an escaped pipe. — Thanks @Princesseuh!

  • a27c06d Fixed an email address starting with www. linking as a URL instead of an email. — Thanks @Princesseuh!

  • 9094edd Improved markdownToMdast and markdownToHast performance on documents containing non-ASCII characters, which previously fell off a fast path and cost more than twice as much to decode. — Thanks @Princesseuh!

  • ac2b172 Fixed the text after a GFM autolink being mangled when the URL ends on a character reference or a backslash, which could decode the wrong character, report an overlapping position, or swallow the inline HTML or emphasis that followed. — Thanks @Princesseuh!

  • 137ff48 Faster across the board: parsing is ~10% cheaper, editing the tree from plugins now costs proportionally to how much you change rather than how big the document is (3 edits on a 115KB document: ~160µs → under 50µs), reading nodes inside plugins is 40-75% faster, and memory stays flat under sustained workloads. — Thanks @Princesseuh!

  • c9f0757 Fixed MDX error messages reporting two different locations for documents that use lone carriage returns as line endings. — Thanks @Princesseuh!

  • 50824f3 Fixed every position being shifted by one in documents that start with a byte-order mark. — Thanks @Princesseuh!

  • ac2b172 Fixed fenced code block lang and meta splitting on whitespace that a character reference produced. — Thanks @Princesseuh!

  • 419e711 With smart punctuation enabled, an unmatched close-flanking double quote (like the inch mark in 24" monitor) now renders as a closing curly quote instead of an opening one. A double quote after a digit no longer opens a quotation, so dimension notation like 24"x36" closes throughout. — Thanks @Princesseuh!

  • ac2b172 Fixed a bare URL or email not linking when the character just before it is an emoji or other astral punctuation. — Thanks @Princesseuh!

0.9.5 — 2026-07-08

Patch changes

  • ef3974e Exposes a ctx.sourceFormat property on both mdast and hast plugin contexts. It is "markdown" when the plugin runs during a Markdown compile (markdownToHtml) and "mdx" during an MDX compile (mdxToJs), letting a plugin shared between both pipelines branch on which format it is handling. — Thanks @Princesseuh!
  • 92c006a Fixed satteri failing to bundle due to wasm dependencies — Thanks @The-LukeZ for your first contribution 🎉!
  • a579002 Set the license field in the package.json — Thanks @ghostdevv!

0.9.4 — 2026-06-29

Patch changes

  • c6a9088 Fixes plugin ctx.source being polluted with duplicated, concatenated content appended after the original document. — Thanks @Princesseuh!
  • 65e0758 Exposes the MdastVisitorContext type from the satteri package. — Thanks @HiDeoo!
  • 07ee532 Fixes JSX nested in an MDX attribute expression (e.g. prop={<p>hi</p>} or title={<>x</>}) being emitted as raw, un-lowered JSX, which produced invalid JavaScript. Also fixes quotes and apostrophes in such JSX text (e.g. prop={<p>Acme Corp.'s "best" tool</p>}) being mis-scanned as JS string literals and causing a parse error — the expression scanner now consumes a JSX element's children as text. — Thanks @vaneenige for your first contribution 🎉!
  • 2be5f6b Updated binding.browser.ts to export functions from browser.js — Thanks @noClaps for your first contribution 🎉!

0.9.3 — 2026-06-25

Patch changes

  • fab4a2d Fixes a blank line inside a template literal or block comment in an MDX import/export causing an Unterminated string error. The blank line no longer ends the statement early. — Thanks @Princesseuh!
  • fab4a2d Fixes inline math like $\frac{-b}{2a}$ failing to compile in MDX. Braces inside $...$ are now treated as math text, not a JSX expression. — Thanks @Princesseuh!
  • 66e4f07 Fixes Markdown plugins returning rawHtml with literal { or } rendering those braces as MDX escape fragments in markdownToHtml. — Thanks @snvtac for your first contribution 🎉!
  • fab4a2d Fixes quotes inside a regex in an MDX JSX attribute (e.g. ins={[/icon="[^"]+"/g]}) causing a parse error. — Thanks @Princesseuh!
  • 27c9023 Fixes headingAttributes silently dropping parsed attributes. — Thanks @Princesseuh!

0.9.2 — 2026-06-23

Patch changes

  • 6128184 Add prebuilt native bindings for more platforms: linux-arm64-gnu, linux-x64-musl, linux-arm64-musl, and win32-arm64-msvc. — Thanks @Princesseuh!

0.9.1 — 2026-06-19

Patch changes

  • 64877f0 Adds a data option to markdownToHtml, mdxToJs, and CompileOptions that seeds the document data bag before plugins run. The same object is surfaced to plugins as ctx.data and returned as result.data, so values can be passed both into and out of a compile. — Thanks @Princesseuh!
  • 855379c Fix MDX import/export blocks being broken by a following whitespace-only line. A line containing only spaces or tabs now ends the ESM block exactly like an empty line, instead of being consumed as a statement continuation (which produced a Could not parse esm with oxc error). — Thanks @Princesseuh!
  • 855379c MDX parse errors now carry a source line and column. Previously, errors in import/export blocks dropped the position entirely, and errors in {…} expressions and JSX attributes were reported as a bare byte offset, so downstream tooling reported an unknown location. JSX attribute and spread expression errors now point at the offending attribute rather than the element's opening <. — Thanks @Princesseuh!
  • 7c78426 Fixes a performance regression when not using any plugins. — Thanks @Princesseuh!

0.9.0 — 2026-06-18

Minor changes

  • b2ae465 Improves performance when using plugins by using a new method of communication between Rust and JS. — Thanks @Princesseuh!

Patch changes

  • 6bcdf06 features.superscript and features.subscript now render ^text^ as <sup>text</sup> and ~text~ as <sub>text</sub> as documented, instead of <em>. The MDAST now exposes dedicated superscript and subscript node types, which plugins can visit and construct. Plugins that previously matched these spans as emphasis nodes should switch to the new node types. — Thanks @morinokami for your first contribution 🎉!

  • d6e28f4 Fixes a parse error when an MDX expression uses top-level await, such as <Card data={await getData()} />. — Thanks @Princesseuh!

  • 9867bbc Add ctx.parent(node) and ctx.indexOf(node) to the MDAST and HAST plugin visitor contexts.

    parent() returns a node's parent (or undefined at the root) and is climbable to reach any ancestor;

    indexOf() returns a node's position within its parent's children. Together they make it possible to do operations depending on ancestry and siblings. — Thanks @Princesseuh!

  • 0d36b24 Aligns directive attribute type with mdast-util-directive by allowing nullish attribute values. — Thanks @HiDeoo!

  • efba0de Add the missing position and data properties to the raw hast node type. — Thanks @Princesseuh!

  • 77b8b1d Add ctx.data, a document-scoped data bag shared across every plugin in the compile.

    Writes from one plugin are visible to later plugins, and the bag persists across the mdast→hast boundary, so hast plugins can read what mdast plugins wrote. After compilation the final state is returned on result.data. The bag lives entirely on the JS side, so any value is allowed (functions, class instances, Map/Set) and references are preserved, much like vfile.data. Specific keys can be typed by augmenting the DataMap interface via declare module "satteri". — Thanks @Princesseuh!

0.8.2 — 2026-06-11

Patch changes

  • 42835bc Fixes a smart punctuation issue where double quotes could be rendered with the wrong direction when quoted text appeared next to text without whitespace. — Thanks @HiDeoo for your first contribution 🎉!

0.8.1 — 2026-06-08

Patch changes

  • e58b500 Fixes a parsing error when a MDX attribute contained the closing tag of itself, e.g. <Component attr="</Component>">. The parser would incorrectly treat the </Component> as the closing tag of the component, instead of part of the attribute value. — Thanks @Princesseuh!

  • f41d32f Fixes ctx.setProperty(node, "children", [...]), which used to throw an error. You can now set a node's children directly, and any other properties you set on the same node still take effect. — Thanks @Princesseuh!

  • 67ac7b0 Fixes ctx.textContent() not including inline math. A heading like # Energy $E=mc^2$ would only return Energy instead of Energy E=mc^2. — Thanks @Princesseuh!

  • 67ac7b0 Fixes several kinds of nodes getting mangled when a plugin would move or duplicate them. — Thanks @Princesseuh!

  • 7979f1e Fixes a crash when a plugin replaces a node with a tree containing an empty text node in a document that has non-ASCII characters (e.g. é). — Thanks @HiDeoo for your first contribution 🎉!

  • f41d32f Adds ctx.insertChildAt(node, index, child) and ctx.removeChildAt(node, index) for editing a node's children by position.

    insertBefore, insertAfter, prependChild, appendChild, and insertChildAt now also accept an array of nodes, so you can insert several at once. — Thanks @Princesseuh!

0.8.0 — 2026-06-03

Minor changes

  • 5b45ec8 Disabled math parsing by default; pass math: true to re-enable inline $...$ and display $$...$$ math. — Thanks @Princesseuh!

Patch changes

  • c91de73 Made HAST plugins match MDAST when a transform targets a node removed or replaced earlier in the same pass: the stranded transform is now dropped with a warning instead of throwing a fatal error. — Thanks @Princesseuh!
  • c91de73 Fixed ctx.wrapNode() dropping content: the wrapper's own children are now kept after the wrapped node, and prependChild/appendChild calls on a node in the same pass it is wrapped are applied instead of being silently dropped. — Thanks @Princesseuh!
  • c91de73 Fixed a crash when a plugin returned a replacement node whose children included the node being visited (for example, wrapping a heading in a <div> that contains it). — Thanks @Princesseuh!

0.7.0 — 2026-06-02

Minor changes

  • 8d84807 Adds granular features.gfm control. Footnotes can now be customized without requiring a plugin. backContent and backLabel each accept either a string template or a JS callback (referenceNumber, rerunIndex) => string for cases that need to branch on the index.

    // Disable footnotes, keep the rest of GFM.
    markdownToHtml(source, { features: { gfm: { footnotes: false } } });
    
    // String templates.
    markdownToHtml(source, {
      features: {
        gfm: {
          footnotes: {
            label: "Notes de bas de page",
            backContent: "↑",
            backLabel: "Retour à la référence {reference}",
          },
        },
      },
    });
    
    // Callbacks for per-backref control.
    markdownToHtml(source, {
      features: {
        gfm: {
          footnotes: {
            backLabel: (n, k) => (k > 1 ? `Retour ${n}-${k}` : `Retour ${n}`),
            backContent: (_n, k) => (k === 1 ? "↑" : `↑${k}`),
          },
        },
      },
    });

    In a string template, {reference} expands to the footnote number on the first backref and to number-K on repeated backrefs to the same definition. Template mode also appends <sup>K</sup> after the back content on reruns; callback mode skips the auto-sup and lets the callback return the final content. — Thanks @Princesseuh!

  • b8d8fa8 The filename option (and the ctx.filename it surfaced to plugins) is now fileURL and only accepts a URL instead of a string. Create one with new URL('path/to/file', import.meta.url), convert a file path with pathToFileURL('path/to/file'), or pass an existing file URL directly.

    This change was made to avoid normalization issues across operating systems, enable the support of virtual paths and just generally promote a more consistent format over raw strings. — Thanks @Princesseuh!

  • 8d84807 Adds granular features.math control. singleDollarTextMath: false keeps single-$ constructs as literal text (so prose can carry currency like "$50 to $100") while $$ ... $$ still parses as display math.

    markdownToHtml(source, {
      features: { math: { singleDollarTextMath: false } },
    });

    — Thanks @Princesseuh!

Patch changes

  • b8d8fa8 Nested directives now transform correctly. When a plugin turns a directive into something else (for example a containerDirective visitor that renders both an outer :::note and a nested :::tip as asides), the inner one is transformed too — in a single pass.

    A node returned from a visitor that passes existing children through (e.g. { ...node, children: [...node.children] }) now keeps those children's identity, so a transform queued on a nested one in the same pass still applies. Previously this crashed with patch targets node N inside a removed subtree.

    Note: a visitor's own freshly-built nodes are not re-walked by that same visitor. Produce their final shape directly, or hand off to a later plugin (which sees the materialized tree). — Thanks @Princesseuh!

  • c69e907 Fixes Markdown plugins that return raw Markdown or HTML ({ raw } / { rawHtml }) sometimes inserting unnecessary nested root nodes into the MDAST tree. — Thanks @Princesseuh!

  • d6badad Fixes position property always returning undefined on hast nodes. — Thanks @Princesseuh!

  • b8d8fa8 Directive labels now render full Markdown. :::note[Custom **strong** Label] shows bold text instead of literal ** markers. Emphasis, links, inline code, and (in MDX) components and expressions all work inside a label now, on container, leaf, and text directives. Previously a label only understood inline code.

    Directives that end with an HTML block also close cleanly now. A :::note whose last line before the closing fence is </details> no longer leaks a stray ::: into the output. — Thanks @Princesseuh!

  • 18f269f Fixed inline style custom properties (--*) being lowercased in MDX, which broke var() references to case-sensitive names like --tmLabel — Thanks @Princesseuh!

0.6.3 — 2026-05-21

Patch changes

  • 1c7b915 Type parseExpression() as an actual ESTree Program instead of Record<string, any>. — Thanks @Princesseuh!

0.6.2 — 2026-05-20

Patch changes

  • 82928b3 Export the MDX node types (MdxJsxFlowElement, MdxJsxFlowElementHast, and the rest) — Thanks @Princesseuh!

0.6.1 — 2026-05-19

Patch changes

  • befcaf0 Fix a crash when an MDX file defines a component with export const, export function, or export class and then uses it as a JSX tag. Previously the component would be treated as if it had to come from props.components, and rendering threw "Expected component X to be defined" unless you also passed it in. It now resolves to the locally-defined component as expected. — Thanks @Princesseuh!

0.6.0 — 2026-05-18

Minor changes

  • f12e64e Added elementAttributeNameCase and stylePropertyNameCase options. Set elementAttributeNameCase: "html" to emit class/for instead of className/htmlFor, and stylePropertyNameCase: "css" to keep kebab-case keys in style objects. Defaults stay React-compatible. — Thanks @Princesseuh!

Patch changes

  • f12e64e Fixed MDX files that declare a layout via export { default } from ... or export default not rendering at runtime. — Thanks @Princesseuh!

0.5.1 — 2026-05-12

Patch changes

  • 4a189f7 Fixed possible memory leak when a plugin threw during compilation. — Thanks @Princesseuh!
  • 4a189f7 Fixed plugin-inserted MDX JSX elements compiling as literal HTML tags instead of routing through _components, which prevented user overrides via the components prop. — Thanks @Princesseuh!

0.5.0 — 2026-05-12

Minor changes

  • adeb321 markdownToHtml and mdxToJs now return an object instead of a bare string. The first field carries the rendered output (html, or code for MDX), and a new frontmatter field exposes the first YAML or TOML frontmatter block in the document, or null if none.

    // Before
    const html = markdownToHtml(source);
    
    // After
    const { html, frontmatter } = markdownToHtml(source);

    This makes it easier to then pass the frontmatter to a YAML / TOML library of your choice, without needing to extract it using a plugin. — Thanks @Princesseuh!

Patch changes

  • 26f2c22 Add a fallback for WebContainer that downloads @bruits/satteri-wasm32-wasi on demand when none of the native or WASI bindings are reachable in the install. — Thanks @Princesseuh!

0.4.0 — 2026-05-07

Minor changes

  • 6f380d3 Added factory-shape support to hastPlugins and mdastPlugins: each entry can now be a function returning a plugin definition, called once per compile. This is useful for stateful plugins. — Thanks @Princesseuh!

0.3.5 — 2026-05-06

Patch changes

  • 22c4f06 Fixes a rare case where plugins could produce corrupted output in very specific situations. — Thanks @Princesseuh!

0.3.4 — 2026-04-30

Patch changes

  • 80d21c8 Fix a crash when an MDAST plugin returns a tree containing a directive (containerDirective / leafDirective / textDirective) and the surrounding document contains multi-byte text (e.g. Devanagari, CJK). — Thanks @Princesseuh!
  • 80d21c8 Reduced memory usage when using MDAST plugins. — Thanks @Princesseuh!

0.3.3 — 2026-04-30

Patch changes

  • 8e7642c Fixed compilation crashing with invalid type: map, expected a sequence when an MDAST plugin returned a tree containing a directive node (containerDirective, leafDirective, textDirective). Directive children now round-trip through plugins correctly. — Thanks @Princesseuh!

0.3.2 — 2026-04-29

Patch changes

  • bf7c5a0 Fixed SVG attributes names (e.g. viewBox, fillOpacity) being converted to lowercase when set on elements from JS plugins — Thanks @Princesseuh!
  • bf7c5a0 Fixed numeric property values (e.g. width: 16, start: 5) being silently dropped when set on elements from JS plugins. — Thanks @Princesseuh!

0.3.1 — 2026-04-29

Patch changes

  • 467bdf9 Fixed plugin-set data being lost or corrupted on MDAST and HAST nodes in certain cases. — Thanks @Princesseuh!

0.3.0 — 2026-04-29

Minor changes

  • baae3b8 MDAST plugins can now set data.hName, data.hProperties, and data.hChildren on a node and have Sätteri render the corresponding HAST element, matching the rehype idiom.

    This is especially useful for rendering directives, given a containerDirective, an hName of "aside" and hProperties of { className: ["note"] }, satteri will emit <aside class="note">…</aside>. — Thanks @Princesseuh!

Patch changes

  • baae3b8 Fixed a crash when an MDAST plugin called ctx.setProperty(node, "data", …) on certain specific node types (e.g. paragraph, blockquote, delete). The call now succeeds and the data round-trips through the conversion pipeline as expected. — Thanks @Princesseuh!

  • baae3b8 Fixed plugins silently dropping all but the last structural change against a given node. Multiple insertBefore/insertAfter calls on the same node, or sibling inserts paired with a removeNode on that same node, now all apply in the order they were issued.

    Combinations that don't have a sensible meaning, like modifying something inside a removed subtree, now report an error instead of silently dropping the change. — Thanks @Princesseuh!

0.2.8 — 2026-04-29

Patch changes

  • 1f92697 Added visitor support for containerDirective, leafDirective, and textDirective nodes. Plugin authors can now subscribe to directive nodes directly (with typed name/attributes and children).

    Removed the root visitor key. Plugins should subscribe to specific node types instead; a dedicated API for prepending or appending content at the document level will land separately. — Thanks @Princesseuh!

0.2.7 — 2026-04-27

Patch changes

  • f632abf Various MDX parsing fixes:

    • Fixed non-ASCII content in MDX expressions/JSX inside containers (blockquotes, lists) being corrupted due to byte-by-byte char casting.
    • Fixed MDX-only paragraphs inside blockquotes not being unraveled (producing spurious <p> wrappers).
    • Fixed multiple JSX elements on one line only rendering the first element.
    • Multiple other cases of small inconsistencies with @mdxjs/mdx, notably in whitespace handling and node positions. — Thanks @Princesseuh!
  • f632abf Added granular smart punctuation options (ENABLE_SMART_QUOTES, ENABLE_SMART_DASHES, ENABLE_SMART_ELLIPSES) that can be enabled independently instead of the entire group. — Thanks @Princesseuh!

  • 5736ca4 Fixes many output inconsistencies with remark across Markdown, GFM, and MDX parsing, mostly found by extensive property-based fuzz testing. Notable areas: GFM bare-URL detection, MDX JSX flow vs inline classification, footnote numbering and section ordering, directive label inline parsing, list spread/tight handling, and reference link spans. — Thanks @Princesseuh!

0.2.6 — 2026-04-17

Patch changes

  • 11ffcfc Fixed unclosed { in a paragraph silently consuming later blocks as an MDX expression, and fixed literal { inside code spans being falsely reported as an unclosed MDX expression — Thanks @Princesseuh!

0.2.5 — 2026-04-16

Patch changes

  • 6f9f66f Fixed JSX inside MDX expression bodies, JSX inside .map() callbacks or other expressions is now compiled to _jsx() calls instead of being dropped or emitted as raw JSX — Thanks @Princesseuh!

0.2.4 — 2026-04-16

Patch changes

  • ef20299 Fixed hyphenated JSX element names (e.g. <my-widget>) written explicitly in MDX being incorrectly routed through the components provider and producing invalid JavaScript — Thanks @Princesseuh!
  • ef20299 Fixed script and style element contents being entity-escaped, which produced invalid output (e.g. &lt; inside <script>) — Thanks @Princesseuh!
  • ef20299 Fixed HAST property names not being mapped to their HTML attribute names during rendering (e.g. className now renders as class, htmlFor as for) — Thanks @Princesseuh!
  • ef20299 Fixed source positions being dropped for most node types during mdast-to-hast conversion, so hast plugins now see accurate positions across the tree — Thanks @Princesseuh!
  • ef20299 Fixed code blocks missing trailing newlines when using hast plugins — Thanks @Princesseuh!
  • ef20299 Fixed footnote references and definitions not being rendered when using hast plugins — Thanks @Princesseuh!
  • ef20299 Fixed table column alignment being dropped when using hast plugins — Thanks @Princesseuh!
  • ef20299 Fixed code.value in the MDAST tree including a trailing newline for well-formed fenced code blocks, which diverged from remark-parse. MDAST plugins inspecting node.value now see the same bytes as remark. — Thanks @Princesseuh!
  • ef20299 Fixed task list classes and checkbox inputs being missing when using hast plugins — Thanks @Princesseuh!

0.2.3 — 2026-04-16

Patch changes

  • ae83450 Fixed optimizeStatic silently collapsing elements that have runtime component overrides via export const components — Thanks @Princesseuh!

0.2.2 — 2026-04-15

Patch changes

  • 6f08f69 Fixes missing optionalDependencies field. — Thanks @Princesseuh!

0.2.1 — 2026-04-15

Patch changes

  • b0cdb9b Added parseExpression() to mdxjsEsm nodes, allowing ESM import/export statements to be parsed into ESTree ASTs. — Thanks @Princesseuh!

0.2.0 — 2026-04-14

Minor changes

  • 893ef59 Fix MDX import/export and expression handling to match the behavior of the original JavaScript implementation:
    • Fix mdxjsEsm nodes not being delivered to HAST plugin visitors
    • Fix multiline export blocks (e.g. objects, arrays) being truncated
    • Fix expression boundaries for edge cases involving comments, template literals, regex, and JSX
    • Report errors for unclosed MDX expressions — Thanks @Princesseuh!

Patch changes

  • ecaeb2c Fixes browser export still bringing in Node code by accident. — Thanks @Princesseuh!
  • ecaeb2c Add position data to hast nodes. Position information was already stored in the Rust arena during mdast-to-hast conversion, but was never exposed to the JavaScript side. — Thanks @Princesseuh!