Repository navigation
Releases
Releases · matinfo-tech/markdown-pdf-export
markdown-pdf-export 2.10.1
Immutable
release. Only release title and notes can be modified.
Fixed
- Studio: a logo spot with no image yet no longer shows the word "null" under its buttons.
- Studio: a long page style name wraps inside its card instead of running into the next one.
- Studio: the time a preview took rounds as in 2.9.1 again (1.45 s shows as 1.4 s, not 1.5 s).
npm: https://www.npmjs.com/package/markdown-pdf-export/v/2.10.1
markdown-pdf-export 2.10.0
Immutable
release. Only release title and notes can be modified.
Added
- Studio can be shown in another language by an editor that embeds it:
window.studioHost.text
gives Studio's texts, keyed by the English text, andstudio/strings.jsonlists them all
(generated from the code, checked by a test). With a translation, the starting layouts and the
"Page 1 of 9" chip write the footer in that language too (Page {page} sur {pages}), and a
layout saved in English is still recognised. Without one, Studio is unchanged. Messages from the
server and the "Add to my editor" dialog stay in English.
Fixed
- Studio: longer choices no longer push the design controls out of the side panel. The margin
buttons wrap when a fourth one (From file) does not fit, and the paper menu gives way to the
orientation buttons beside it.
npm: https://www.npmjs.com/package/markdown-pdf-export/v/2.10.0
markdown-pdf-export 2.9.1
Immutable
release. Only release title and notes can be modified.
Fixed
- Maths now prints in KaTeX's own fonts. The bundled KaTeX stylesheet had merged its 20 font rules
into one broken rule, so no KaTeX font loaded and formulas fell back to Times:\mathbb{R}
printed as a plain R,\mathcalletters and large brackets were wrong. The end-to-end tests now
check that a PDF with maths embeds KaTeX's fonts.
Changed
- The README points VS Code users to the
Markdown PDF Export extension.
npm: https://www.npmjs.com/package/markdown-pdf-export/v/2.9.1
markdown-pdf-export 2.9.0
Immutable
release. Only release title and notes can be modified.
Added
- Studio links to the documentation: a Help link beside each section title (page style, fonts
and paper, header and footer), a Going further section with per-document settings, the header
and footer reference and all settings, and the header and footer reference in the notice shown
for a header or footer written by hand. The links open in a new tab, or in the browser from an
editor panel.
npm: https://www.npmjs.com/package/markdown-pdf-export/v/2.9.0
markdown-pdf-export 2.8.0
Immutable
release. Only release title and notes can be modified.
Added
authorin a settings file: the name (or list of names) printed by{author}when a document's
front matter has none. A document's ownauthor:still wins.author: none(or an emptyauthor:) in a document's front matter prints no author there, even
when the settings file sets one.
npm: https://www.npmjs.com/package/markdown-pdf-export/v/2.8.0
markdown-pdf-export 2.7.0
Immutable
release. Only release title and notes can be modified.
Added
--jsonon export: prints the result as JSON (PDF path, settings files used, raw HTML removed,
diagrams left as code) instead of the PDF path, for scripts and editors.studio --embedded, for an editor extension that shows Studio in its own panel. A preview
request can then name the document to draw and carry its unsaved text; the page draws again on
astudio:refreshevent and hands each PDF towindow.studioHost.showPdfwhen the panel
provides one. See Studio inside an editor.- Every Studio preview answer has an
X-Preview-Reportheader with the raw HTML removed and the
diagrams left as code.
Changed
- Studio's page script imports its model with a relative path, so the page can be bundled.
npm: https://www.npmjs.com/package/markdown-pdf-export/v/2.7.0
markdown-pdf-export 2.6.0
Immutable
release. Only release title and notes can be modified.
Security
- Windows: opening the PDF (
open_after_export) no longer goes throughcmd /C start. A file
name with&(for examplea&calc&.md) could start another program. Files now open through
explorer.exe, which does not read the name as commands. Studio's link still opens as before.
Added
--no-project-settings: ignore.markdown-pdf.jsonfiles, for documents you do not trust (a
project file can set"sanitize": "none", a stylesheet or an output folder). Works with export,
--watch,doctorandstudio --file. Command line only, like--sanitize.
Changed
- Editor setup (
setupand Studio's Add to my editor) run from inside an Electron app used as
Node, such as an upcoming VS Code extension, now writes thenpx -y markdown-pdf-exportcommand
instead of that app's internal binary, which other editors cannot run.
Fixed
open_after_exportno longer crashes the command line when the system has no opener (no
xdg-openon a server); the PDF was already written.- Opening the PDF or Studio no longer passes
ELECTRON_RUN_AS_NODEto the opened app.
npm: https://www.npmjs.com/package/markdown-pdf-export/v/2.6.0
markdown-pdf-export 2.5.0
Immutable
release. Only release title and notes can be modified.
Added
- Mermaid diagrams: a
```mermaidcode block is drawn as a diagram (flowchart, sequence,
Gantt, class, state, pie and the rest). On by default, works offline; set"mermaid": false
or--no-mermaidto print the code instead. Diagrams are drawn in a separate page before
printing, so the document page still runs no JavaScript. A diagram with a mistake stays a
code block and is listed in the newdiagram_errorsresult field. - Task lists (
- [x]), footnotes ([^1]) and GitHub alerts (> [!NOTE],[!TIP],
[!IMPORTANT],[!WARNING],[!CAUTION]) now render instead of printing as plain text.
Always on, no setting.
Changed
- Headings get an id by default, so
[text](#heading)links work in the PDF without any setting.
Set"heading_anchors": false(or--no-heading-anchors) to turn it off. A custom stylesheet
with#slugselectors may now match headings.
npm: https://www.npmjs.com/package/markdown-pdf-export/v/2.5.0
markdown-pdf-export 2.4.0
Immutable
release. Only release title and notes can be modified.
Security
- Raw HTML in the Markdown can no longer run code or load other pages while the PDF is printed.
By default ("sanitize": "safe")<script>,<iframe>,<object>,<applet>,<frameset>,
<noembed>and<noframes>are removed with their content;<embed>,<frame>,<meta>,
<base>,<link>,<form>,<title>,<textarea>,<xmp>and<plaintext>are shown as
text;on*event handlers andjavascript:/vbscript:/ non-imagedata:links are
disarmed. The page is also printed with JavaScript off, under a Content Security Policy that
blocks scripts, frames and plugins, and an export that tries to navigate away is stopped.
<style>, inline styles, images and page breaks keep working; code blocks are never changed. font_family,heading_font_familyand the custom stylesheet can no longer close the
<style>element they are placed in.
Changed
- Behaviour change: documents that relied on raw
<script>or<iframe>lose them. Set
"sanitize": "none"in a settings file, or pass--sanitize none, for documents you trust.
Front matter and the MCP tool cannot change this setting. - The export result has
sanitizeandremoved_html(what the filter took out); the command
line prints the latter.doctorshows thesanitizesetting.
npm: https://www.npmjs.com/package/markdown-pdf-export/v/2.4.0
markdown-pdf-export 2.3.1
Immutable
release. Only release title and notes can be modified.
Fixed
- The temporary render HTML is written to the system temp folder, no longer next to the
Markdown file, so it never shows up in the project (or in the editor's file watcher) and a
crash cannot leave it behind there. If the browser cannot read the temp folder, the export
falls back to the old location once and still cleans up after itself. - Temp render files that earlier versions left behind next to the Markdown file are removed
on the next export of that file (only exact.{uuid}.temp_render.htmlnames older than an hour).
Changed
- A settings file path (
MARKDOWN_PDF_SETTINGS,--settings) may start with~or$HOME.
npm: https://www.npmjs.com/package/markdown-pdf-export/v/2.3.1