1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-03-31 22:05:17 +02:00

8 Commits

Author SHA1 Message Date
Alec Thomas
54fd3bc12f Clean up imports and make cmd/chroma its own module. 2021-06-18 16:56:50 +10:00
Siavash Askari Nasr
10329f849e
Add ByGroupNames function, same as ByGroups but use named groups ()
For named groups that are not given, an Error will be emitted anyway.

This also handles the case when an Emitter for group `0` is provided
or not. Since numbers can also be used for names.
But it might be over-doing, because why would anyone use ByGroupNames
if they wanted to assign a token to the whole match?!
2021-06-08 22:26:59 +10:00
Alec Thomas
7e282be495 Update golangci-lint so we can force use of LazyLexer. 2021-04-29 12:08:28 +10:00
satotake
34d9c7143b
Add new TokeniseOption EnsureLF ()
* Add new TokeniseOption EnsureLF

ref 

* Use efficient process suggested by @chmike
2020-03-04 18:56:47 +11:00
Alec Thomas
3aaf3e542f Fix Java lexer (synced with latest Pygments).
Fixes .
2019-11-05 13:57:51 +11:00
Alec Thomas
ea14dd8660 Fixed a fundamental bug where ^ would always match.
The engine was always passing a string sliced to the current position,
resulting in ^ always matching. Switched to use
FindRunesMatchStartingAt.

Fixes .
2019-06-12 12:32:20 +10:00
Daniel Eloff
9c3abeae1d Tokens by value ()
This results in about a 8% improvement in speed.
2018-11-04 10:22:51 +11:00
Alec Thomas
6326cbaeff Add test for EnsureNL. 2017-10-13 10:58:37 +11:00