This currently works only when `html.WithClasses(true)` is used.
The same colors as for the pre-highlighted lines are used.
Only the line number is highlighted, so difficult to notice, but
better than nothing.
This allows the boolean options to be reconfigured, e.g:
```go
options := getOptions()
options = append(options, html.WithLineNumbers(true))
```
Fixes#301
'l' in gl is for under(l)ine, as the "gu" class is taken by
GenericSubheading.
- Rules for GenericUnderline are added to all the styles
- Make "Underline" style insert "text-decoration: underline" in CSS.
Fixes https://github.com/alecthomas/chroma/issues/159.
Since these are wrapped in a `<pre>`, newlines hint the browser that the
line numbers should be on separate lines. This helps when rendering
content with broken CSS, or in a text-only browser.
This was done to speed up incremental compilation when working on
lexers. That is, modifying a single lexer will no longer require
recompiling all lexers.
This is a (slightly) backwards breaking change in that lexers are no
longer exported directly in the lexers package. The registry API is
"aliased" at the old location.
This commits adds a div wrapper when linenumbers are formatted in table, to get the correct CSS matchers.
This commit also fixes some CSS table issues when tables are put into a larger context with other stylesheets:
* No borders.
* Overflow to fit in potentially narrower containers.
Fixes#62
- Styles now use a builder system, to enforce immutability of styles.
- Corrected and cleaned up how style inheritance works.
- Added a brightening function to colours
- HTML formatter will now automatically pick line and highlight colours
if they are not provided in the style. This is done by slightly
darkening or lightening.
Fixes#21.
This is to solve an issue where writers returned by the Formatter
were often stateful, but this fact was not obvious to the API consumer,
and failed in interesting ways.