Skip to content

[pull] develop from marktext:develop#105

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

[pull] develop from marktext:develop#105
pull[bot] merged 8 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 4 commits June 27, 2026 10:50
A fenced code block written with more than three backticks (required when
the block body itself contains a ``` line) was always re-serialized with
exactly three backticks, so the inner fence closed the block early and the
saved markdown was corrupt. Capture the opening fence length on parse
(stored in meta only when it exceeds the default 3) and emit a fence long
enough for both the original length and any all-backtick line in the body.

Fixes #1841

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A math/diagram/html block's rendered preview was only refreshed from
inputHandler/backspaceHandler, never from update(). Undo and redo reach
the block through editor.applyTextEdit -> update(), so undoing an edit
left a stale formula/diagram in the preview while the source text changed.

Call _updatePreviewIfHave from update() too, guarded so it (a) bails out
during the initial create pass before the block is attached, and (b) only
re-renders when the text actually changed — otherwise update()'s render
races the preview's own one-shot render on append (DiagramPreview.update
is async), leaving the diagram SVG unmounted.

Fixes #1632

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A relative local link such as [doc](./my_file.pdf) was exported to HTML /
PDF verbatim, so the saved document's link pointed into the app resource
directory instead of the file next to the source markdown. Images were
already rewritten to absolute file:// URLs on export; do the same for
<a href> via a sibling resolveLocalLinkHref helper. In-page fragments,
URL schemes (http/https/mailto/data…) and absolute paths are left as-is.

Fixes #1688

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The emoji rule matched any ':name:' run, so the colons inside a timestamp
range such as '12:00-14:00' were tokenized as an (invalid) emoji and shown
with the red mu-warn styling. Reject an emoji opener when the ':' is glued
to a preceding letter or digit; emoji at the start of the text, after
whitespace, or after punctuation are unaffected.

Fixes #1677

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
Jocs and others added 4 commits June 27, 2026 11:14
… sidebar (#4759)

Creating a sidebar file/folder with the same name as an existing one
called outputFile, which truncates the target — silently destroying the
existing file's content with no warning (rename already guards this).
Check the path first and abort with a notice instead of overwriting.

Fixes #1946

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(desktop): ignore content-identical file-change events

A watcher 'change' event fires whenever a file's mtime changes, even when
the content is byte-identical (e.g. a git checkout that touches the file
without changing it). The handler then marked the tab unsaved and showed a
spurious 'file changed on disk' prompt. Skip the change when the new
on-disk content equals the tab's current content.

Fixes #1861

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

* test(desktop): add e2e for the content-identical file-change guard

End-to-end coverage that drives the REAL watcher: it writes the actual
file with byte-identical content and lets the main-process chokidar
watcher -> loadMarkdownFile -> renderer handler run, asserting the tab
stays clean; a genuinely different write still marks it unsaved. (An
earlier draft hand-crafted the IPC payload, which matched tautologically
and proved nothing.)

---------

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

In source-code mode the bundled railscasts theme (used by every dark theme)
painted the selection at #272935 — nearly identical to its #2b2b2b background —
so a selection was effectively invisible. Override the CodeMirror selection
background to the editor's --selection-color so it matches the WYSIWYG editor
and stays visible across themes.

Fixes #2372

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The export dialog's options (page size, margins, font, theme, header/footer,
TOC, …) were component-local refs with hardcoded defaults, so they reset to
default on every dialog open and every app restart. Persist them to
localStorage — the same renderer-side store the sidebar width uses — saving on
change and restoring on mount via a small tested helper.

Fixes #2287

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pull pull Bot merged commit d999370 into code:develop Jun 27, 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