Fix escaped Markdown characters being silently dropped - #8
Merged
Merged
Conversation
- Add case "escape" handler in inlineToAdf to emit escaped chars as plain text nodes instead of dropping them - Fix special-chars fixture to reflect correct output: literal \*, \_, `, \# now preserved as text nodes Co-Authored-By: opencode <noreply@opencode.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Escaped Markdown syntax characters (
\*,\_,\`,\#) were silently dropped from the output instead of being rendered as their literal character equivalents.Changes
escapetoken type ininlineToAdf, emitting the escaped character as a plain text nodespecial-charstest fixture to reflect the correct expected outputReviewer notes
\**not bold\**and\__not bold\__correctly retainemmarks on the inner content — this matches marked's parse, where the first\*/\_escapes to a literal, leaving a valid*...\**/_...\__em span. The fixture accurately reflects this.Escaped characters are emitted as separate adjacent text nodes rather than being merged with surrounding text. This produces correct output — we've manually verified that Confluence renders adjacent plain text nodes without any visible gaps or breaks.