New stuff in Marked Share

Busy day on . A pile of rendering fixes landed with Apex 1.0.20, front matter stopped leaking into the page, Mermaid diagrams and MathJax math finally draw, and highlights can now turn out a shareable quote card. Here’s the tour.
If you missed the introduction of Marked Share, it’s a platform for sharing Markdown, with short share urls, the ability to add highlights and share highlight sets, and a built-in Markdown editor. It integrates tightly with Marked 3, but Marked isn’t required to use it.
You can see examples and a summary of all of these changes via a post on Marked Share itself: .
Apex 1.0.20
Share uses Apex for HTML conversion. Today’s bump to 1.0.20 cleans up two real-world headaches that showed up on published docs:
- Mermaid edges with
|label|(thinkA -->|Yes| B) used to get a fake GFM table separator injected into the fence. Client Mermaid then choked and the diagram never appeared. - Definition lists around fences could reorder or swallow following prose — blank lines dropped, terms buffered past code fences, and the occasional paragraph glued into a callout.
Share keeps an on-read HTML refresh for older stored bodies that were baked with the buggy pipeline, so opening an existing share can heal Mermaid and deflist damage without republishing.
Definition lists are also properly styled now.
Callouts, SVG, and Mermaid on the page
Related work that shipped around the same update:
- GitHub-style callouts render when Apex has them enabled.
- Inline SVG survives sanitization with the attrs it needs (gradients, markers, and friends).
- Mermaid fences draw on document and blog pages under the app CSP, instead of dying as inert blocks.
If you’ve been writing diagrams in Marked and wondering why Share looked empty: that should be fixed now.
Front matter: strip for HTML, keep in the source
YAML (and Pandoc / MultiMarkdown metadata) belongs in your file, not as a visible
and title: … block on the share page. Share now strips leading front matter only for the HTML render. Stored Markdown, Raw download, and TextBundle exports still have the full source. Front-matter title can also set the document title when Marked doesn’t send one explicitly.
The “Note:” vanishing act
A support report caught a nasty edge case: an H1 followed by a paragraph like Note: … or First span: … disappeared from the rendered page while Raw still had everything.
Older Apex treated that leading Word: line as MultiMarkdown metadata and ate the heading with it. 1.0.20 fixed the renderer; Share also tightened undelimited MMD stripping so ordinary prose keys aren’t treated as metadata, and on-read refresh restores shares that were already stored wrong. Existing links should heal when you open them.
Highlight share images
You can turn a focused highlight into a square gradient quote card — title up top, coral/purple gradient quote in the middle, attribution at the bottom.
Click the highlight, hit the share icon on the floating action bar, and you get a live preview with Download and Copy image. It’s meant for pasting into Slack, Notes, social, whatever. Link-preview OG images for ?hl= URLs are still coming; this round is the download/copy path.
MathJax
Document math via MathJax works, with $…$ / $…$ style math in shares should typeset properly instead of sitting around as literal dollars.
What to try
Republish or just reopen a doc on that had Mermaid |label| edges, a definition list next to a fence, or YAML at the top. Add a highlight, open share, grab a PNG. If something still looks off, hit support with a link. Raw vs rendered diffs are very useful for these bugs.
Like or share this post on Mastodon, , or .
BrettTerpstra.com is supported by readers like you. Click here if you'd like to help out.
Find Brett on Mastodon, Bluesky, GitHub, and everywhere else.