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