Skip to content

[pull] develop from marktext:develop#106

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

[pull] develop from marktext:develop#106
pull[bot] merged 6 commits into
code:developfrom
marktext:develop

Conversation

@pull

@pull pull Bot commented Jun 27, 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 6 commits June 27, 2026 17:21
Inside a list item, typing block syntax then Enter split the item and stranded
an extra empty list entry instead of converting the paragraph into the block.
The enterHandler already early-converted code fences in place; generalize that
to every block `_enterConvert` produces — math (`$$`), tables (`|a|b|`) and
HTML blocks (`<div>`).

Extract the match rules into one `matchBlockConversion()` that returns a block
descriptor, reused by both the enterHandler guard and `_enterConvert` (which
now switches on the descriptor) — so the match and conversion can never drift.
Tables and HTML blocks nested in a list item round-trip cleanly.

Fixes #2276

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

Aligning or editing an image rewrites it to an inline HTML <img …> tag so it
can carry the alignment/size attributes. The tag was emitted OPEN (`<img …>`),
which is valid HTML/Markdown but breaks JSX/MDX consumers (Docusaurus throws
"Unterminated JSX contents"). Emit a self-closed `<img … />` from both the
replaceImage and updateImage builders.

Fixes #2505

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
getIndentSpace matched /^(\s*)\S/ against the start of the whole code-block
text, so it always returned line 0's indentation. Pressing Enter on any
indented later line therefore dropped that line's indent. Scope the match to
the cursor's own line.

Fixes #2158

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

CommonMark autolinks (`<https://x.com>`) and GFM bare-URL autolinks render as
`a.mu-auto-link` / `a.mu-auto-link-extension`, but those classes were missing
from linkMouseEvents' LINK_SELECTOR and the renderers never set `data-raw`, so
`getLinkInfo` returned null and a modifier-click never emitted `format-click` —
the link could not be opened. Set `data-{start,end,raw}` on both autolink
anchors and add their classes to the selector. They stay follow-only: the
edit/unlink hover popover is suppressed for autolinks (there is no `[](…)`
source to rewrite, and the URL re-autolinks on the next render).

Fixes #2165

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

Double-clicking a word selects the word plus its trailing whitespace.
Wrapping that whitespace inside the markers produced invalid emphasis
(e.g. `**foo **`), which CommonMark's flanking rules render as literal
text. Trim leading/trailing whitespace off the selection before
`_addFormat` so the markers hug the non-whitespace content.

Fixes #2166

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

* fix(desktop): make empty-state CTA button labels readable in all themes

The "Open Folder" (sidebar tree + search panel) and "New File" (editor)
empty-state buttons styled their label as themeColor on itemBgColor.
Neither is a contrast-controlled pairing, so the label was hard to read
under several themes (e.g. ayu-light, everforest-light).

Use the theme's contrast-tuned primary-button pairing
(--buttonPrimary{Bg,Font}Color) instead — the same variables that drive
the app-wide .button-primary, which every theme picks for readability
against its accent colour.

Closes #4774

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

* test(desktop): assert empty-state buttons are as readable as primary button

Regression guard for #4774: parses the foreground/background custom
properties from each empty-state button's scoped CSS, resolves them
against every built-in theme, and asserts the rendered WCAG contrast is
at least that of the theme's standard .button-primary. Threshold-free, so
it tracks each theme's own baseline rather than a magic number.

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 27, 2026
@pull pull Bot added the ⤵️ pull label Jun 27, 2026
@pull
pull Bot merged commit fd1c14a into code:develop Jun 27, 2026
14 checks passed
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