A Little More on Critic Markup

After the release of Drafts 5.5, I’ve been using Critic Markup even more for the writing I’m doing.1 I hadn’t really used it before now, so leave it to Drafts to provide me some tools to improve the way in which I write.

In that post about the improvements in Drafts 5.5, I had shared updates to my actions for standard and linked posts. These have been super useful for me. But there are others out there that need to use plain Markdown for their posts. I had a follower pose this request on Twitter, and I decided it would be a small challenge to tackle and share.

Unlike my preview action for my site, I needed to keep the raw Markdown, rather than convert it to HTML. This isn’t something I can do natively using the script objects. So I needed a different way to make this all happen. I first needed to identify the Critic Markup elements:

{++add++}
{>>comment<<}
{--delete--}
{==highlight==}
{~~sub~>substitution~~}

Looking at what I needed to do, it was apparent that I needed to first remove the comment and delete elements completely, then keep the text within the add and highlight elements. The substitution element is a bit more tricky, where I need to delete the first word and keep the second word, while deleting the surround elements. With a little help of RegEx, I came up with the pattern:

\{>>.*<<\}|\{--.*--\}|\{==|==\}|\{\+\+|\+\+\}|\{~~.*~>|~~\}

The pipe characters are essentially the “or”, and the rest is to separate the elements. Combining this with elements of JavaScript and the Drafts Script Reference, I created an action to accept critic markup in a new draft, and preserve the existing draft. I did this to show the main RegEx, but it could be used in other ways: this could be a simple script to create a variable for posting; it could be used in conjunction with a step in Shortcuts; or it could even be used when saving out copies of long-form writing.

As the Drafts community and others create new actions that result in tools for writing, it helps to make Drafts more accessible and adaptable to each user. Writing in it may not be for everyone, but you should try it out to be sure. You might be delighted with what you find.


  1. Yes, it‘s been a while. Yes, I’ve been working on things here and there. More to come later.  ↩

Drafts 5.5 – The Markdown Update

The latest Drafts update brings some improvements with Markdown syntax. In addition to the standard Markdown (which has been simplified to represent the original Markdown specification), there are two additional syntax options: MultiMarkdown and GitHub Markdown. MultiMarkdown is a flavor which allows for footnotes, tables, citations, etc. GitHub Markdown is a different flavor of Markdown which supports extensions created by GitHub for rendering on their website, and includes the extensions for strike-through text and tables. I personally use MultiMarkdown, the format with which I’ve been most comfortable writing.

One thing that is included with MultiMarkdown as an option is Critic Markup. Looking through the guide, there are several helpful elements that can be used for editing my writing utilizing Critic Markup. I can highlight some substitutions, additions, and deletions. I can highlight text to show something I might want to work on later. I can also add a basic comment somewhere that won’t be shown in a preview. And with this action, I can easily add any of them with a tap and a text entry, which inserts it in the proper format. This is helpful for creating and previewing the documents in Drafts, and gives users the flexibility to mark up files and save them back to a cloud service. I can see myself using this a lot for longer posts or large reviews. I’ve even modified my own site preview action to render the MultiMarkdown via scripting, as well as updating both my standard and linked post WordPress publishing actions to do the same.

Critic Markup in Drafts vs my site post

There are additional Workspace options for sorting. You can now include flagged drafts in the archive tab – the same way it is done today with the inbox – as well as optionally sort the flagged drafts at the top. And of course, support for using these is also added to the script object. This allows you to give a bit of priority to Drafts in your inbox, depending on how you have your workspace configured. I liken it to something like Gmail: there’s a giant inbox of drafts, and you have a starred list that can be used to filter priority; you can also option to have the starred emails on top to bring them into focus, or have them in their separate list. This smart addition enables more focus on key drafts in your list.

There are some other small improvements and fixes; you can read the full list here. It may seem like a small update to some, but for the advanced users of Markdown, this is a fantastic update. What this should give users a glimpse of for the future of Drafts: custom syntax highlighting. Currently, the following syntaxes are supported: Markdown, MultiMarkdown, GitHub Markdown, JavaScript, and TaskPaper. Whereas I love the new Critic Markup portion of MultiMarkdown, I would love to be able to customize my own syntax. When I used Ulysses for writing, I really liked some of the comment, highlight, delete, and other markup styles. Part of what makes Drafts so versatile to each user is the myriad of ways which it can be customized. Controlling the editor in this fashion would, to me, make the editor the most powerful on iOS. No other editor would allow for syntax highlighting for writing and coding in the same way. I know this will at some point be on the horizon, but that cannot come soon enough. I’ll patiently wait for it after the Drafts for Mac release.

Drafts 5.4: Siri Shortcuts, WordPress, and More

Me, writing for MacStories:

Drafts 5 was recently updated to version 5.4, which brings a host of new features. While there is support for iOS 12's Siri shortcuts and all that they have to offer, there are also other important features that have improved the app's capabilities significantly.

It’s a really great release. And I was thrilled to write it for MacStories. If you haven’t checked it out, head on over and read it there.

PCalc 3.8 With Siri Shortcuts

Federico Viticci, writing for MacStories:

Even though I don’t consider myself an advanced PCalc user (I mostly use the app for conversions and basic operations), I’ve grown to appreciate the convenience of running frequent calculations with Siri and I’ve started integrating PCalc with the Shortcuts app in some interesting ways. As a result of its adoption of Siri shortcuts in iOS 12, my overall usage of PCalc has increased: I don’t necessarily open the app more often, but I access native PCalc features either via Siri or Shortcuts from all of my devices.

I own PCalc and use it often for work. I use it in my widget as well. But I really don’t use it much more beyond that. Reading what Federico has done with the app has me wanting to try a bunch of new things with the world’s best calculator.

I’m excited to see this integration via Siri Shortcuts, and I’m intrigued by the possibilities that lie ahead with other apps providing the same integrations.