FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix code spans after an unclosed backtick string by TanbirRamim · Pull Request #459 · commonmark/commonmark-java · GitHub

Repository navigation

Fix code spans after an unclosed backtick string - #459

Open
TanbirRamim wants to merge 1 commit into
commonmark:mainfrom
TanbirRamim:code-span-after-unclosed-backticks
Open

TanbirRamim wants to merge 1 commit into
commonmark:mainfrom
TanbirRamim:code-span-after-unclosed-backticks

Conversation

Copy link
Copy Markdown

With an unclosed backtick string before two code spans, like `` a `c`, the second code span was rendered as text. Parsing the first span overwrote the cached closer position that was recorded when the unclosed string scanned to the end, so the later opener looked unmatched. The cache is now only updated before that full scan. I added a test in SpecialInputTest, and the commonmark module tests pass. Fixes #458.

After scanning to the end for an unclosed backtick string, the parser
overwrote the cached last position of each backtick run length while
parsing later code spans. A later opener of the same length then looked
like it had no closer and was left as text.

Fixes commonmark#458
Copilot AI lite review requested due to automatic review settings September 25, 2026 03:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

No deployments
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Second code span not recognised after an unclosed backtick string and another code span

2 participants


Back | FazBrowse Home | New Git URL