Skip to content

[pull] develop from marktext:develop#81

Merged
pull[bot] merged 2 commits into
code:developfrom
marktext:develop
Jun 20, 2026
Merged

[pull] develop from marktext:develop#81
pull[bot] merged 2 commits into
code:developfrom
marktext:develop

Conversation

@pull

@pull pull Bot commented Jun 20, 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 2 commits June 20, 2026 07:49
* 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>
@pull pull Bot locked and limited conversation to collaborators Jun 20, 2026
@pull pull Bot added the ⤵️ pull label Jun 20, 2026
@pull pull Bot merged commit 5186340 into code:develop Jun 20, 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