{{ message }}
Repository navigation
fix: #3504 clarify export TOC requirements and dialog labels - #5746
Merged
Merged
Conversation
Contributor
Zane-0x5a
added a commit
to Zane-0x5a/marktext
that referenced
this pull request
Oct 15, 2026
Upstream reworked the old print path (marktext#5722 makes MarkdownPrint wait for the notation fonts; marktext#5716 resolves URL-encoded Windows image paths). The fork replaced that path with the paged preview, so printService and its two specs keep the fork's side. Both fixes still reach the preview: the image fix lives in resolveLocalImageSrc, which exportHtml uses, and the notation fonts arrive through the muya export styles, the export themes and getCssForOptions. Main already waits for fonts.ready under print media before printToPDF. marktext#5746 drops the Info tab and explains that a table of contents needs a [TOC] line. The HTML export dialog takes both changes. The print preview panel shows the same explanation under its contents settings. The preload keeps the fork's visual zoom limit next to upstream's platform path import, and the editor store keeps isSameList. marktext#5691 was merged earlier from its PR head; upstream's squash differs from it only by commits that came in alongside it. Verified on Windows 11: typecheck, desktop and muya lint, and the desktop unit suite pass. In the muya unit suite, only the tableChessboard entrypoint import timed out, and only on cold runs (it passes alone). The print, export, sidebar, theme and title bar e2e specs plus upstream's new 3510, 5394, 5683 and 5710 specs pass in background windows, except 5394's exact `toBe(400)` width check. At this machine's 1.75 device pixel ratio the restored width reads 400.0000305, with or without the camera transform; with `toBeCloseTo(400, 3)` all three scenarios pass.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Closes #3504
Summary
The export dialog exposes table-of-contents settings without explaining that the document must contain a standalone
[TOC]line. Users can change these settings and export without seeing a table of contents.[TOC]on its own line and explains where the table will appear.Type of change
Test plan
pnpm run lintpassed with existing warnings.pnpm run typecheckpassed.pnpm run build:unpackpassed for the initial TOC changes.pdf.spec.tsandexportHtml.spec.ts: 38 tests passed.Notes for reviewers
TOC insertion still requires a document marker; this PR makes that requirement visible without changing export behavior.
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.