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