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.