Experience Internet custom ExpressionEngine add-on development.

Introducing SmartDown 1.2

Published on 15th September, 2011 by Stephen Lewis

It’s not often that I decide an add-on point release warrants a blog post, but the latest version of SmartDown is a bit more than your typical array of minor bug fixes.

Easier EE code samples

A boatload of behind-the-scenes changes has resulted in much more reliable (and predictable) Markdown rendering, particularly when dealing with ExpressionEngine code examples within your content.

In the past something like could be a complete pain, with double-encoded curly-braces, and all manner of similar headaches:

{exp:channel:entries channel='mrw'}
    {if '{lunch}' == 'pizza'}
        <blockquote>Jews like pizza</blockquote>

Not any more. SmartDown automatically fixes your code samples, without any additional faffing about.

More flexible configuration

Previous versions of SmartDown required you to specify your preferred formatting options in every {exp:smartdown} template tag.

Worse than that, if you used SmartDown as the field formatting option for your custom field (the easiest way of using SmartDown), you couldn’t specify any formatting options at all.

SmartDown 1.2 fixes both of these shortcomings, by allowing you to specify default settings in your config.php file. Want to disable SmartyPants across the board? Easy:

$config['smartdown'] = array(
    'disable:smartypants' => 'yes'

Custom extension hooks

Finally, SmartDown 1.2 introduces two extension hooks, which can be used to manipulate content before and after SmartDown processing. Perfect if you need to do some custom pre-processing, or tidy up content after the fact.

As ever, the SmartDown documentation has complete configuration and usage information. If you have any questions or suggestions, please let me know.

Spread the word

Never miss out

Recent articles

In this section

Hungry for more?

Sign up for our “Best of the Blog” email newsletter (you can unsubscribe at any time).

No spam, not ever.

Copyright © Experience Internet. Read our Privacy Policy.