* feat(remend): add opt-in inline KaTeX completion
* docs(remend): update README to include inline KaTeX completion and clarify option defaults
* fix(remend): complete partial closing $ in block math without duplicating
* Add changeset for inline KaTeX completion feature
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* fix(remend): don't complete bold/italic/strikethrough inside complete inline code spans
Bold, italic, and strikethrough handlers were using isWithinCodeBlock()
which only detects triple-backtick fenced code blocks. Markers inside
single-backtick inline code spans (e.g. `**bold`) were incorrectly
completed, leaking outside the code span.
Fix:
- Add isWithinCompleteInlineCode() to code-block-utils.ts that returns
true only when a position is inside a *complete* (both delimiters
present) inline code span. This preserves the existing streaming
behavior where emphasis inside an *incomplete* inline code span
(still being streamed) continues to be closed correctly.
- Apply the check in handleIncompleteBold, handleIncompleteBoldItalic,
handleIncompleteDoubleUnderscoreItalic, handleIncompleteSingleAsterisk-
Italic, and handleIncompleteStrikethrough.
Fixes#424
* fix(remend): add isWithinCompleteInlineCode guard to handleIncompleteSingleUnderscoreItalic
* chore: add changeset for inline code emphasis fix
---------
Co-authored-by: Dmitrii Troitskii <jsleitor@gmail.com>
Remove dead code (isAsteriskListMarker, redundant isWithinCodeBlock
checks, unreachable fallbacks) and replace defensive patterns (|| [],
?? defaults) with non-null assertions where invariants guarantee
safety. Add coverage-gaps test suite covering edge cases in emphasis,
link, strikethrough, HTML tag, math block, and horizontal rule handlers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When processing HTML like `<a target="_blank">`, the underscore in
`_blank` was being counted as an unclosed emphasis marker, causing
remend to append a trailing `_` to close it.
Added `isWithinHtmlTag()` check to `shouldSkipUnderscore()` — if the
underscore is between `<` and `>` of an HTML tag, it's skipped for
emphasis counting.
Fixes#385
Co-authored-by: Shurik <shurik@openclaw.ai>