Skip to content

Fix non-zero rect when ligatures are enabled - #184

Merged
cyanzhong merged 1 commit into
mainfrom
develop
Sep 4, 2026
Merged

Fix non-zero rect when ligatures are enabled#184
cyanzhong merged 1 commit into
mainfrom
develop

Conversation

@cyanzhong

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is narrowly scoped to a theme rule, is covered by a targeted test assertion, and the bundled outputs reflect the same update.

Pull request overview

This PR addresses an issue in the hidden-syntax rendering mode where enabling font ligatures can lead to a non-zero bounding rect for syntax that should be visually “zero-sized”, by explicitly disabling ligatures on hidden-syntax source spans.

Changes:

  • Disable ligatures for .cm-md-syntaxHiddenSource (and its descendants) via font-variant-ligatures: none !important.
  • Extend the existing hidden-syntax theme test to assert the generated CSS includes the new ligature rule (value + !important priority).
  • Update built dist/ bundles to include the theme change.
File summaries
File Description
tests/hiddenSyntax.test.ts Adds assertions verifying the baseTheme CSS disables ligatures with !important.
src/hiddenSyntax/theme.ts Disables ligatures for hidden syntax source spans to avoid non-zero geometry.
dist/markedit-preview.js Rebuilt bundle reflecting the theme change.
dist/lite/markedit-preview.js Rebuilt lite bundle reflecting the theme change.
Review details
  • Files reviewed: 2/4 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@cyanzhong
cyanzhong merged commit b7724d1 into main Sep 4, 2026
2 checks passed
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.

2 participants