Prevents an unstyled flash that occurs when we were only applying the
syntax highlighting class in Javascript. Now for these uncached blobs
the server can add the syntax class, and for (possibly) cached fenced
code blocks, the Javascript will add it as needed.
Instead of rendering this value server-side, we use Javascript and Gon
to apply the user's color scheme (or the default) to any syntax
highlighted code blocks.
This will make it easier to cache these blocks in the future because
they're no longer state-dependent.
I decided to create a fork of rouge as rouge lacks a HTML formatter with
the required options such as wrapping a line with <span> tags.
Furthermore I was not really convinced about the clarity of rouge's
source code.
Rugments 1.0.0beta3 for now only includes some basic linting and a new
HTML formatter. Everything else should behave the same.
2015-01-15 13:41:11 +01:00
Renamed from app/views/shared/_file_hljs.html.haml (Browse further)