3 stable releases
6.0.0 | Jan 3, 2025 |
---|---|
5.2.0 | Jan 2, 2025 |
4.6.1 | Jan 23, 2022 |
#4 in #colouring
2,352 downloads per month
Used in broot
1MB
8K
SLoC
syntect-no-panic
This is a fork of Syntect.
This fork is very similar to the original version 5.2 of Syntect, but modified to avoid panicking.
With this fork, the behavior on a syntax having an invalid rule isn't to panic anymore, and is tuned with options:
let options = HighlightOptions {
ignore_errors: true,
..Default::default()
};
HighlightLines::new(syntax, theme, options)
With ignore_errors: false
, a faulty regex in a syntax, detected when highlighting some lines, will result in an error.
With ignore_errors: true
, the rule containing the faulty regex won't be applied but rest of the highlighting process will proceed.
Please try to use the original Syntect instead of this temporary fork.
There's no project to add features: as soon as I can use the normal syntect, this repository will be considered obsolete to avoid fragmenting the ecosystem.
If you really feel like you need to use this, contact @dystroy on the Miaou chat.
Dependencies
~0.9–10MB
~113K SLoC