[pull] develop from marktext:develop#92
Merged
Merged
Conversation
…#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>
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 : )