Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Prevent inline formatting inside inline code#3790

Open
shriram-svg wants to merge 1 commit into
BoostIO:masterfrom
shriram-svg:fix-issue-2251-inline-code-highlighting
Open

Prevent inline formatting inside inline code#3790
shriram-svg wants to merge 1 commit into
BoostIO:masterfrom
shriram-svg:fix-issue-2251-inline-code-highlighting

Conversation

@shriram-svg
Copy link
Copy Markdown

Summary

  • strip inline formatting token classes when BFM/CodeMirror already marks a token as code
  • add a BFM runMode regression for multiline inline-code highlighting with asterisks inside the code span

Fixes #2251.

Verification

  • npx --yes -p node@20 node node_modules/jest/bin/jest.js tests/lib/bfm.test.js --runInBand --testURL=http://localhost
  • npx --yes -p node@20 node node_modules/eslint/bin/eslint.js tests/lib/bfm.test.js
  • git diff --check
  • CodeMirror 5.40.2 lockfile reproduction script: bad code-token count is 0 after this patch

Note: extra_scripts/codemirror/mode/bfm/bfm.js is skipped by the repository ESLint ignore pattern; forcing ESLint on that legacy file reports pre-existing project style errors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text surrounded by asterisks in inline code blocks is wrongly highlighted

2 participants