... | @@ -23,14 +23,16 @@ Introduction |
... | @@ -23,14 +23,16 @@ Introduction |
|
|
|
|
|
Language definition files define the syntax of language elements. Colour themes define how these language elements should be formatted in the final highlighted document.
|
|
Language definition files define the syntax of language elements. Colour themes define how these language elements should be formatted in the final highlighted document.
|
|
|
|
|
|
Highlight theme files are Lua files that can handle formatting for various output formats, including HTML. While highlight themes support basic formatting (Colour, Bold, Italic, and Underline), when targetting HTML output you might wish for a finer control over styling, and opt for defining your own custom CSS themes — or [Sass](http://sass-lang.com/), [Less](http://lesscss.org/), [Stylus](http://stylus-lang.com/), etc.
|
|
Highlight theme files are Lua files that can handle formatting for various output formats, including HTML. While Highlight themes support basic formatting (Colour, Bold, Italic, and Underline), when targetting HTML output you might wish for a finer control over styling, and opt for defining your own custom CSS themes — or use [Sass](http://sass-lang.com/), [Less](http://lesscss.org/), [Stylus](http://stylus-lang.com/), etc.
|
|
|
|
|
|
In order to define the right CSS classes, you’ll find helpful the table below, listing the various **language elements** and their corresponding HTML/CSS classes in the final output.
|
|
In order to define the right CSS classes, you’ll find helpful the table below, listing the various **language elements** and their corresponding HTML/CSS classes in the final output.
|
|
|
|
|
|
Notes on Highlight HTML Output
|
|
Notes on Highlight HTML Output
|
|
------------------------------
|
|
------------------------------
|
|
|
|
|
|
Highlights default behaviour for HTML output is to enclose the code block within a preformatted block with class `hl` (`<pre class="hl">`), and then enclose all the various language elements within span tags with the `hl` class along the element’s corresponding class.
|
|
Highlight's default behaviour for HTML output is to enclose the code block within a preformatted block with class `hl` (`<pre class="hl">`), and then enclose all the various language elements within `<span>` tags with the `hl` class along the element’s corresponding class.
|
|
|
|
|
|
|
|
> __NOTE__: `<span>` tags are never nested in Highlight output!
|
|
|
|
|
|
Example source:
|
|
Example source:
|
|
|
|
|
... | | ... | |