Perch 2.5 Textile and Markdown update
Among the features in Perch 2.5 is an update to our Textile and Markdown parsers. This is one of the things we’ve been able to do by moving our PHP version requirement to PHP 5.3 as the modern parsers have this as a minimum requirement.
For Textile we have been able to update to a newer version of the library, we were stuck on an old version that supported PHP5.2. No real enhancements but it is good to move away from outdated dependencies. The big news is for those of you who use Markdown.
Parsedown Extra Support
We’re now able to offer Markdown parsed by Parsedown – including Parsedown Extra. Parsedown is a project to develop a “better Markdown Parser” and Parsedown Extra brings the features of Markdown Extra to Parsedown. This brings a bunch of new features to Markdown – things you might be using elsewhere and discovered you couldn’t use in our earlier implementation.
Parsedown Extra brings to Markdown some of the things that Textile users have long-since taken for granted. For example, you can create simple tables in Markdown:
First Header | Second Header
------------- | -------------
Content Cell | Content Cell
Content Cell | Content Cell
You can also add classes or other attributes inline, to add a class to an image:
![img](url){.class}
It is worth noting that if you had used our previous syntax for adding classes you will need to update any content to the new syntax if resaving it. This should however be the only inconsistency between the two versions.
The big selling point for Parsedown is the fact it is a lot faster, but as Perch doesn’t do anything as silly as parsing Markdown at runtime that’s not a big issue for Perchers. The extra Markdown features are something that many of you have requested however, so now you have them.