tlatsas/jinja2-highlight — pull request #6 by ardinor (2014-06-20 02:23:05+00:00)
Title: Line numbering and cssclass support

Hi Tasos,

I've added support for Pygment's HtmlFormatter's line numbering (both inline and table line numbering can be used) and I've also added support to set the CSS class used by Pygments. I've updated the unit tests and the example as well.

![linenumbering-example](https://cloud.githubusercontent.com/assets/2785496/3335950/c45962dc-f81f-11e3-9734-823e54435f40.png)

Line numbering can be set in the highlight tag by putting in `lineno='inline'` or `lineno='table'`. The cssclass can be appending `jinja2_highlight_cssclass` to the jinja2 environment and setting it's value to the CSS class name you would like. Both line numbering and CSS class are optional and from my tests jinja2_highlight will continue to work fine if both are not used, line numbering can also be used without specifying the language.

In regards to the example, I'm not entirely sure if the way I've added jinja2_highlight_cssclass to the jinja2 environment in the MyFlask class is entirely correct or in best practices. It does work though... The second way I mentioned setting it (`app.jinja_env.extend(jinja2_highlight_cssclass = 'codehilite')`) is what I'm using personally though.

If there's anything else you'd like me to do with these changes please let me know.

Thanks,
- Jordan