Skip to content

Keep delimiters from pairing across runs in one paragraph - #46

Open
AbhinavMir wants to merge 1 commit into
firecrawl:mainfrom
AbhinavMir:backtick-pairing
Open

Keep delimiters from pairing across runs in one paragraph#46
AbhinavMir wants to merge 1 commit into
firecrawl:mainfrom
AbhinavMir:backtick-pairing

Conversation

@AbhinavMir

@AbhinavMir AbhinavMir commented Aug 6, 2026

Copy link
Copy Markdown

Runs that still have content after them now escape their pairable delimiters, so at most one raw delimiter survives per paragraph and nothing can pair with it.

For issue #45.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

A delimiter with nothing to pair with is inert, so it was left unescaped.
That check ran over one run, but Markdown pairs across the whole paragraph:
two runs each ending in a backtick put two of them on the line, and the
text between became a code span. Emphasis and links went the same way, so
a paragraph reading `see [` / `note](http://example.com)` came out as a
working hyperlink the document never had.

Runs that still have content after them now escape their pairable
delimiters, which leaves at most one raw delimiter per paragraph, at the
end, where nothing can reach it. Link labels and image alt text count as
having content after them, since `](url)` always follows.

Across 684 generated paragraphs pairing delimiters over a hard break, 44
converted to markup that was not in the document; none do now. The fixture
corpus is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant