marijnh/CodeMirror2 — pull request #437 by benkeen (2012-03-12 06:50:45+00:00)
Title: New mode: Smarty Templating language

Hi Marijn,

This is a mode for the PHP Smarty templating language (http://www.smarty.net/). Since Smarty can be used to as a pre-parser to generate any old thing (HTML, CSV, CSS, XML, you name it), I thought the best approach would be to first write a plain text/Smarty parser to focus on the Smarty syntax highlighting. This mode is for that. Once it’s looking okay, I was planning to write a second "smartyhtmlmixed" mode for HTML, CSS, JS + Smarty - which is by far the most common usage for Smarty.

Since Smarty allows custom tag delimiters, the mode allows you to customize it, but defaults to the standard { and } chars.

Thoughts? I’d very much welcome any suggestions you have for improving the code.

Thanks!

- Ben
@vancouverben