I finally got a significant Marked update out. ==highlight== rendering, and a BYO JavaScript setup I think (some) users will like.
First, I don’t know why it’s become so popular, but I’ve received a lot of requests for ==highlight== rendering. So I’ve added it as an option. I also added ~~deletion~~ rendering, and ~underline~ as an additional option. I had to make ~underline~ function separately as it conflicts with MultiMarkdown’s subscript syntax. But you can find all of these options under Settings->Processor. There’s even an option to convert ==highlights== and ~~deletions~~ to CriticMarkup, which allows for a nicer display in Marked.
Next, I’ve had requests for Mermaid diagramming for a long time. I’ve had fewer requests for including arbitrary JavaScript in the preview, but I figured if I was going to start adding JS libraries, I might as well make it as flexible as possible.
If you look under Settings->Style, you’ll find an Additional Scripts button. This will open a panel where you can control what JS is loaded in every preview (docs). Mermaid has its own checkbox, and if I add additional library support, checkboxes will be added here. Below that is a 3-pane field where you can add JavaScript from local files, CDN urls, or embed raw text.
Note that when adding libraries, you’re responsible for making them update. The Marked.hooks API allows you to hook a render function into the update call, so every time the preview updates (which is not a full refresh), you can trigger whatever rendering needs to happen. See the docs for details on that.
There are a few other fixes. I published a second update this morning (v2.6.46) that improves multi-line ==highlight== rendering, and finally allows you to customize the reading speed for Reading Time calculations. That’s available right now for direct (Paddle) customers and in review for Setapp and MAS customers.
If you’ve never checked Marked out, head over to
marked2app.com to learn more!