[pull] develop from marktext:develop#113
Merged
Merged
Conversation
…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>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )