npm / remend
remend
What changed in remend 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-24.
2 breaking3 new APIs and options5 performance31 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initremend 141 changes
Breaking changes 2
The built-in handlers controlled by bold, italic, boldItalic, and strikethrough are now one emphasis handler at priority 30; custom handlers ordered against old priorities may need new ones.
Removes CJS builds.
New APIs and options 3
Adds opt-in inline KaTeX completion that turns
$formulainto$formula$; it defaults to false to avoid ambiguity with currency symbols.Adds an option enabled by default that escapes a single
~between word characters to prevent false strikethrough rendering; it can be disabled with{ singleTilde: false }.remend is now configurable.
Performance 5
Completed-link searches are skipped for brackets already known to be literal, avoiding quadratic work on unmatched bracket prefixes before a completed link.
Messages with many skipped delimiter openers avoid quadratic emphasis gating through precomputed lookups and skipping disabled or overlength runs before gating.
Unmatched opening brackets followed by many completed links no longer cause quadratic emphasis processing, including when link and image healing are disabled.
A shared single-pass scanner replaces per-character rescans that made healing quadratic on delimiter-heavy input.
Uses a cached linear-time position lookup instead of rescanning the whole prefix on every call, avoiding quadratic degradation when probing many positions.
Fixes and other changes 31
Emphasis healing now follows CommonMark and GFM parsing, including opener scope, line boundaries, code spans, and literal markers.
Unfinished links and images are completed only in the final paragraph, list item, heading, or table row; earlier unclosed brackets no longer affect later blocks.
A dash starting a new list item after a list item or block quote is no longer given a zero-width space that displayed as a stray dash on the preceding line.
Public optional props accept possibly-undefined values forwarded to Streamdown and remend without type errors.
Single tildes inside URLs and HTML tag attributes are no longer escaped, preserving working addresses such as https://example.com/a~b.
Fence and inline code detection follows CommonMark, including tilde fences, fences inside block quotes and list items, CRLF line endings, and multi-backtick spans; content inside code is not healed as prose.
Double underscores are counted per maximal run with flanking rules, preventing identifiers containing
__from inventing or swallowing emphasis closers.The incomplete-HTML-tag handler skips candidates inside math blocks and continues to later candidates, avoiding truncation of math expressions while still stripping genuine incomplete tags.
Healing is idempotent: healed output re-heals to itself.
Incomplete images during streaming are replaced with
instead of being removed entirely.Text-only link mode resolves every unmatched bracket in one call.
Removing the lookbehind assertion prevents a SyntaxError during module evaluation on these JavaScriptCore versions.
Preserves complete italic emphasis when a closing asterisk is followed by word text.
LaTeX paren and bracket math are treated as protected contexts during emphasis completion.
Fixes block KaTeX completion when streaming produces a partial closing
$.Emphasis completion handlers no longer close bold, italic, or strikethrough markers inside complete inline code spans, preventing stray markers outside the backticks.
Fixes stray asterisks stemming from Mermaid diagrams.
Repairs handling of comparison operators in list items.
Handles incomplete HTML tags.
Fixes whitespace-bound asterisks.
Fixes incorrect bold-italic nesting auto-completion.
Fixes extra underscores in code block output.
Handles a code block followed by incomplete inline code.
Improves support for horizontal rules.
Prevents adding a trailing underscore for images with underscores in their URL.
Fixes incorrect completion of inline code containing $$.
Prevents asterisks inside math blocks from being incorrectly treated as italic markers.
Closes nested underscore italic before bold.
Prevents adding closing markers to overlapping bold and italic.
Fixes setext heading issues.
Fixes trailing space issues.