Commit Graph

7 Commits

Author SHA1 Message Date
Robert Speicher 54771100eb Add user_color_scheme class to file_highlight
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.
2015-08-26 11:34:28 -07:00
Robert Speicher 2c3e42e4a4 Remove user_color_scheme_class
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.
2015-08-25 15:32:38 -07:00
Robert Speicher da15428340 Simplify line numbering 2015-06-19 04:31:24 -04:00
Robert Speicher b3f9be0639 Refactor and spec BlobView JS 2015-06-19 04:31:23 -04:00
Douwe Maan 9a50db693a Fix timeout when rendering file with thousands of lines. 2015-06-05 13:56:37 +02:00
Dmitriy Zaporozhets 904c382f6a Fix code rendering for snippets 2015-02-17 00:16:28 -08:00
Stefan Tatschner bf079c24af Replace highlight.js with rouge-fork rugments
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