fix: #3504 clarify export TOC requirements and dialog labels by Jocs · Pull Request #5746 · marktext/marktext · GitHub
Skip to content

fix: #3504 clarify export TOC requirements and dialog labels - #5746

Merged
Jocs merged 1 commit into
developfrom
fix/3504-export-toc-guidance
Oct 14, 2026
Merged

Jocs merged 1 commit into
developfrom
fix/3504-export-toc-guidance

Conversation

@Jocs

@Jocs Jocs commented Oct 14, 2026

Copy link
Copy Markdown
Member

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.

  • Add a persistent explanation in the Table of Contents tab that tells users to enter [TOC] on its own line and explains where the table will appear.
  • Rename “Include top heading” to “Include level-1 headings” and clarify that it includes all H1 headings.
  • Remove the redundant Info tab and its translations; open the Page tab by default and return to it when switching from print-only header settings to HTML export.
  • Remove the export button's trailing ellipsis and the page-title translation's trailing colon, leaving the single colon supplied by the text-box component.
  • Apply the copy updates across all 12 locales.

Type of change

  • Bug fix (non-breaking, fixes an issue)
  • New feature (non-breaking, adds functionality)
  • Breaking change (causes existing functionality to change)
  • Documentation update

Test plan

  • No new tests needed: this change updates UI copy and removes a redundant tab; export generation behavior is unchanged.
  • Manually tested on macOS: dev was restarted for user verification; no screenshots were requested.
  • pnpm run lint passed with existing warnings.
  • pnpm run typecheck passed.
  • pnpm run build:unpack passed for the initial TOC changes.
  • pdf.spec.ts and exportHtml.spec.ts: 38 tests passed.
  • Checked all 12 locales for trailing export-button ellipses and page-title colons, and verified generated minified translations match their source files.

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.

@github-actions

Copy link
Copy Markdown
Contributor

@Jocs
Jocs merged commit a52595f into develop Oct 14, 2026
12 checks passed
@Jocs
Jocs deleted the fix/3504-export-toc-guidance branch October 14, 2026 06:51
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Table of contents option in export menu not working

1 participant