Skip to content

[pull] develop from marktext:develop#92

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

[pull] develop from marktext:develop#92
pull[bot] merged 4 commits into
code:developfrom
marktext:develop

Conversation

@pull

@pull pull Bot commented Jun 23, 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 4 commits June 23, 2026 15:49
…#1931) (#4649)

The block-math rule required the closing `$$` to be immediately followed by a
newline or end-of-input, so a closing marker with any trailing space/tab
(`$$ `) failed to match and the block fell through to plain text — even though
fenced code blocks already tolerate trailing whitespace.

Allow optional spaces/tabs after the closing marker (`\1[ \t]*(?:\n|$)`).

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

`arrowHandler` appended a new trailing paragraph whenever ArrowDown was
pressed at the end of the last block with no next block — including when the
last block was already an empty paragraph. So holding/repeating ArrowDown in
an empty document created a new empty paragraph on every keypress.

Only append a trailing paragraph when the current (last) block has content;
otherwise the caret stays put. Guard the offset computation since the cursor
target can now be absent.

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

Typing a list marker on a new (soft-line-break) line after bold text failed
to create a list: `_convertToList`'s regex used a lazy pre-group
(`([\s\S]*?)`) that, when two trailing spaces followed the bold text, matched
the `*` inside the closing `**` as the bullet marker instead of the `-` just
typed on the next line — corrupting the bold syntax into `**foo:*`.

Anchor the marker to a line start: the pre-group now captures whole lines up
to and including the newline before the marker, so an earlier `*` can never be
mistaken for the bullet.

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

* fix(muya): strip trailing punctuation from extended autolinks (#2096)

A bare (extended) autolink swallowed trailing punctuation because the path
component matched `\S+`, so `http://host/path/to/resource:` followed by a
space linked the trailing `:` as part of the URL. Per GFM §6.9, trailing
punctuation (`?!.,:*_~`) is not part of a www/url autolink.

After matching, trim a trailing punctuation run from the raw text and the
www/url group (interior punctuation is kept; email autolinks are unaffected),
and advance the lexer by the trimmed length so the punctuation renders as
plain text.

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

* fix(muya): complete GFM §6.9 autolink extent trimming (#2096)

The first pass only stripped the trailing punctuation run (?!.,:*_~). GFM
§6.9 trims an extended www/url autolink's extent for three further cases,
all needed because the path is matched greedily (`\S+`):

- a `<` ends the autolink;
- a trailing `)` is excluded when the link has more `)` than `(`, so an
  autolink can sit inside parentheses, e.g. `(https://…/Foo_(bar))`;
- a trailing `;` closing an `&entity;`-looking reference is excluded.

The rules interleave and are applied repeatedly (e.g. `).`), mirroring
cmark-gfm's `autolink_delim`. Extracted into a `trimAutoLinkExtent` helper;
email autolinks remain unaffected (their extent is fixed by the domain regex).

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

* docs(muya): link the GFM §6.9 spec in the autolink-trimming comment

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 23, 2026
@pull pull Bot added the ⤵️ pull label Jun 23, 2026
@pull
pull Bot merged commit 84e0d87 into code:develop Jun 23, 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