Siavash Askari Nasr
225e1862d3
Pass *LexerState
as context to emitters
...
Useful for accessing named capture groups and context set by
`mutators` and other field and methods LexerState provides.
2021-05-07 22:55:54 +10:00
Alec Thomas
022b6f4fc2
Fix --json.
...
Fixes #199 .
2018-11-12 18:50:00 +11:00
Daniel Eloff
9c3abeae1d
Tokens by value ( #187 )
...
This results in about a 8% improvement in speed.
2018-11-04 10:22:51 +11:00
Kaushal Modi
371820dad6
Assign .gl class to GenericUnderline; add CSS rules for the same
...
'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 .
2018-08-01 17:28:52 -04:00
Alec Thomas
e56590a815
Add data-driven test framework for lexers.
...
See #68 .
2018-01-02 14:53:25 +11:00
Bjørn Erik Pedersen
27733ac753
Add table styled line numbers ( #54 )
...
Fixes #52
2017-10-13 10:49:20 +11:00
Alec Thomas
bdc1124369
Switch to Pygments-style CSS class names.
...
Add GitHub theme + CSS to style importer.
2017-09-25 21:46:25 +10:00
Alec Thomas
cc0e4a59ab
Switch to an Iterator interface.
...
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.
2017-09-20 22:19:36 +10:00
Alec Thomas
a5637e60b2
Support for highlighting ranges of lines.
2017-09-20 14:24:49 +10:00
Alec Thomas
3f230ec717
Add support for line numbers.
2017-09-20 13:33:44 +10:00
Alec Thomas
c8636118d5
Remove unused dark/light style type.
2017-09-18 14:19:59 +10:00
Alec Thomas
a10fd0a23d
Switch to github.com/dlclark/regexp2.
...
This makes translating Pygments lexers much much simpler (and possible).
2017-09-18 11:16:44 +10:00
Alec Thomas
d12529ae61
HTML formatter + import all Pygments styles.
2017-07-20 00:01:29 -07:00
Alec Thomas
1f47bd705c
Use pointers to tokens + support regex flags in importer.
2017-06-07 19:47:59 +10:00
Alec Thomas
5dedc6e45b
Add a bunch of automatically translated lexers.
2017-06-07 19:47:59 +10:00
Alec Thomas
b30de35ff1
Use a callback to emit tokens.
...
This is a) faster and b) supports streaming output.
2017-06-07 19:47:59 +10:00
Alec Thomas
b2fb8edf77
Initial commit! Working!
2017-06-07 19:47:59 +10:00