MultiMarkdown In MarsEdit

July 27th, 2011

For a very long time, MarsEdit has included built-in support for processing text with Markdown, so users who publish in that text-based format can see in MarsEdit’s preview window how the post will look after it’s published.

It’s becoming more and more common for folks who use and love Markdown to expect it to behave the way a popular superset of the language, MultiMarkdown, behaves.

When I asked on Twitter how people would feel about MarsEdit replacing the standard default Markdown filter with one that does MultiMarkdown processing instead, the responsive was enormously enthusiastic: people want MultiMarkdown.

Because I believe that for all MarsEdit users who currently enjoy Markdown support, changing to MultiMarkdown will either be a non-issue or a god-send, I plan to make this switch in an update soon.

While I was looking into the current state of MultiMarkdown I learned that since I last looked into it, is has transformed from a Perl-script version like the original Markdown, into a blazingly fast, pure C version. This intrigued me, because it would be fantastic if while upgrading MarsEdit’s Markdown support to support more features and please more people, it could also become orders of magnitude faster.

The first hiccup I noticed when examining the source code is that it depended heavily on an LGPL open source library called GLib. While the LGPL license would be acceptable to bundle within a standalone tool in MarsEdit, it feels like overkill, and frankly, I’d rather have a standalone MultiMarkdown binary that doesn’t require any outside dependencies.

So that’s what I spent the last day doing.

My fork of MultiMarkdown adds an Xcode project, and a small but important number of code changes to substitute for what GLib was formerly providing. The result is a standalone x86_64/i386 binary that accomplishes MultiMarkdown filtering on any Mac running 10.6 or higher.

If you want to test this fancy new MultiMarkdown filter in MarsEdit:

  1. Quit MarsEdit
  2. Download MultiMarkdown Beta Filter
  3. Unzip, and copy the folder named “MultiMarkdownBeta” to:

    [Home] -> Library -> Application Support -> MarsEdit -> TextFilters

  4. Relaunch MarsEdit

Your MarsEdit preview window should now have a “MultiMarkdown” option in the preview window text filter popup. Select MultiMarkdown and see how it works for you as you preview Markdown-formatted posts in HTML Text mode.

I expect this version will have some bugs, which is part of the motivation for getting the adventurous among you to give it a try. The best way to report bugs is  by email or a message in the support forums. But if you just have low-key comments to make, this blog post would be an appropriate location as well. Thanks for your help!

Update, July 28: I’ve made major performance and correctness changes in the past day, so if you are helping to test the new MultiMarkdown filter, be sure to grab the latest version and update the copy in your MarsEdit TextFilters folder.

5 Responses to “MultiMarkdown In MarsEdit”

  1. Mark Dalrymple Says:

    LGPL you can link into the app – it’s the Lesser/Library GPL. If you make changes you have to publish them, but it doesn’t infect the whole program like regular GPL and lead to compartmentalizing into an external tool.

  2. Vasi Says:

    Agreed with Mark, LGPL is fine to link with in a closed-source program. (Note that only dynamic linking is ok, static linking is apparently not. Weird, eh?)

  3. Adam Says:

    I downloaded the MultiMarkdown Beta Filter and it’s a Window’s file with an exe extension. Is there another Mac version?

  4. Daniel Jalkut Says:

    @Adam – sorry for the confusion. It’s not really a Windows executable, this is an artifact of the format MarsEdit expects for its “TextFilters”. Safari may be showing you the contents of the folder “MultiMarkdownBeta”. What you want to do is copy the whole MultiMarkdownBeta folder into the MarsEdit TextFilters folder.

  5. lea Says:

    @Vasi: That’s because you should be able to replace the library. If the library is statically linked with the executable then it’s technically part of the executable and cannot easily be replaced.

    It’s still much better than proprietary software, that you can’t link with at all.

Comments are closed.

Follow the Conversation

Stay up-to-date by subscribing to the Comments RSS Feed for this entry.