[pull] develop from marktext:develop#81
Merged
Merged
Conversation
* fix(editor): align the first line number in an empty code block repositionLineNumberSpans' trailing-empty-line fallback runs when a line has no text node to measure — including the single line of a wholly empty code block, where the TreeWalker finds nothing and lineIdx stays 0. The fallback then placed that first line one line-height below a non-existent predecessor, so the "1" rendered a full row too low. Treat the first line as flush with the gutter top (0px); only later trailing lines stack a line-height below their predecessor. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(editor): cancel line-box leading in code block line numbers A collapsed range's getBoundingClientRect().top sits at the text/caret box, which is below the line box top by the line-box leading (~0.3em). Positioning each gutter span as `range.top - wrapperTop` therefore pushed every line number down by that constant leading, so numbers no longer lined up with their code rows. Anchor every span to the first measured line's top instead of the wrapper top. The constant leading cancels out, line 1 stays flush with the gutter top (matching the empty-block case), and per-line deltas are preserved so wrap mode still aligns. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…#4584) * feat(muya): add independent spellcheckHideMarks option Hiding the spelling squiggle was only achievable by setting `spellcheckEnabled=false`, which also turns off Chromium's native checker and its right-click suggestions. Add a separate `spellcheckHideMarks` option that toggles a `mu-hide-spelling-marks` class on the container; a CSS rule clears `::spelling-error`'s text-decoration so the squiggle disappears while `spellcheck="true"` (and therefore suggestions) stays active. Verified in Electron 42's Chromium: `::spelling-error` applies to native spellcheck markers and `text-decoration: none` removes the underline without disabling checking. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(editor): keep spelling suggestions when "no underline" is on The spellcheckerNoUnderline preference reused the spellcheckEnabled engine option (`spellcheckEnabled: !value`), so enabling "hide marks" set the container's spellcheck attribute to false and killed the native checker's right-click suggestions — a regression since the switch to Electron's builtin spellchecker (#2895). Wire the preference to the new independent `spellcheckHideMarks` option instead, and seed it at editor construction, so the two spelling preferences no longer fight over `spellcheckEnabled`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- 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 : )