Skip to content

[pull] develop from marktext:develop#113

Merged
pull[bot] merged 3 commits into
code:developfrom
marktext:develop
Jul 4, 2026
Merged

[pull] develop from marktext:develop#113
pull[bot] merged 3 commits into
code:developfrom
marktext:develop

Conversation

@pull

@pull pull Bot commented Jul 4, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Jocs and others added 3 commits July 4, 2026 15:08
…rscripts (#4837) (#4839)

* fix(muya): stop inline math from showing a scrollbar for trailing sub/superscripts (#4837)

Committed inline math renders in a `.mu-math-render` box that #4615 gave
`overflow: auto hidden` so genuinely long formulas scroll instead of
overflowing the editor. KaTeX renders every sub/superscript with a 2px
`.vlist-s` strut that `.vlist-t2 { margin-right: -2px }` cancels visually —
but the negative margin doesn't shrink `scrollWidth`, so the scroll extent
stays 2px wider than the visible width. `overflow-x: auto` then draws a
spurious scrollbar under any short formula ending in a sub/superscript
(e.g. `$x_1$`).

Zero the strut and its compensating margin inside the inline-math render.
This is net-zero visually (top/height/width unchanged) and a genuinely long
formula still overflows and stays scrollable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(muya): assert short inline math ending in a subscript has no scrollbar (#4837)

Adds a regression test that a hidden inline `$x_1$` render has zero horizontal
overflow (scrollWidth === clientWidth), so `overflow-x: auto` draws no
scrollbar. Fails with `overflowX === 2` before the CSS fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The styled-HTML / PDF export path renders every mermaid diagram with a
single batched `mermaid.run({ nodes: [...] })`. That call rejects the
whole batch on the first parse error, so one diagram with invalid syntax
(e.g. a `|` inside a `[label]`) threw all the way up to the desktop
export wrapper — the entire export failed with "Failed to export
document" and no file was written.

Render each mermaid diagram in its own `mermaid.run` inside a try/catch,
falling back to the same `< Invalid Diagram >` placeholder the other
diagram renderers (`_renderDiagram`) and the inline editor already use.
A broken diagram now degrades locally and the rest of the document
exports. Also skip loading mermaid entirely when the document has none.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…4787) (#4845)

Three user-facing English strings had typos (reported by a translator
working from the English base):

- "The language MarkText use" -> "uses"
- "The dilimiter used in order list" -> "delimiter"
- "loading the file change because the tab..." -> "file changes"

Fixed in the source `en.json` locale and the matching preference
`schema.json` descriptions. `en.min.json` is generated by
`minify-locales` at build time, so it is not edited here.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Jul 4, 2026
@pull pull Bot added the ⤵️ pull label Jul 4, 2026
@pull pull Bot merged commit c0d839c into code:develop Jul 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant