Releases: trishume/syntect
Releases · trishume/syntect
v5.3.0
Improvements
- Add
HighlightLines::from_state()constructor [#569]
Fixes
- Ignore UTF-8 BOM on syntax detection [#530]
- Escape CSS class names [#539]
- Avoid an infinite loop when a syntax definition continually pushes contexts without consuming any input [#597]
- Return an error when a syntax definition contains an unescaped trailing backslash instead of panicking at runtime [#548]
Dependencies
- Replace
bitflagswith a manual implementation [#590] - Update
public-apito work with new lockfile versions [#591] - Update
thiserrorto v2 [#594] - Update
fancy-regexto0.16.2[#596] - Bump
rust_onigversion to avoid build failures on newer GCC versions [#584]
Docs
- Add various projects to the README showcase:
- Deprecate
syntect::parsing::SCOPE_REPOfor removal [#580]
Other
- Format with
rustfmt[#528] - Bump nightly toolchain version to fix a test build failure [#542]
- Remove unused import in yaml load test [#531]
- Use
BufWriterto improve unoptimized serialization perf [#554] - Commit
Cargo.lockto avoid flaky CI issues [#567] - Switch from
expect-testtoinsta[#568] then later topublic-api'ssnapshot-testingsupport [#595] - Speed up unittest runtime [#577] [#598]
- Fix new clippy lints [#585]
- Use
cargo-hackto check many different features in CI [#593]
v5.2.0
Improvements
- Eliminate syntect library's dependency on serde's "derive" feature. Increases build parallelism.
- Add parsing of gutterSettings.
Dependencies
- Update
regex-syntaxto 0.8.
v5.1.0
Improvements
- Fix how
syntect::util::split_at()handles multi-byte characters - Allow case insensitive search for .tmtheme paths
- impl
PartialEqforTheme
Dependencies
- Upgrade
fancy-regexto 0.11 - Upgrade
regex-syntaxto 0.7 - Replace
lazy_staticwithonce_cell
Other
- Change MSRV policy to "last three stable versions"
- Make
Debugimpl ofsyntect::highlighting::Colorless verbose
Breaking changes for improved startup time and error handling!
Thanks to @Enselic for basically all the work to make this release happen!
Breaking changes
- Lazy-load syntaxes to significantly improve startup time. This changes the binary format of syntax dump files.
- Remove
ContextId::new()from public API to support lazy-loading of syntaxes - Rename
HighlightLines::highlight()toHighlightLines::highlight_line()to make it clear that the function takes one line at a time - Make
plistdependency (used for loading themes) optional via newplist-loadfeature - Remove obsolete
dump-load-rsanddump-create-rsfeatures that has been identical todump-loadanddump-createfor two years - Remove deprecated items
ThemeSettings::highlight_foreground,ThemeSettings::selection_background,ClassedHTMLGenerator::new,ClassedHTMLGenerator::parse_html_for_line,html::css_for_theme,html::tokens_to_classed_htmlandhtml::tokens_to_classed_spans - Mark all error enums as
#[non_exhaustive] - These functions have been changed to return a
Resultto allow propagation of errors:html::ClassedHTMLGenerator::parse_html_for_line_which_includes_newlinehtml::append_highlighted_html_for_styled_linehtml::css_for_theme_with_class_stylehtml::highlighted_html_for_stringhtml::line_tokens_to_classed_spanshtml::styled_line_to_highlighted_htmlparsing::ParseState::parse_lineparsing::ScopeStack::applyparsing::ScopeStack::apply_with_hookparsing::syntax_definition::Context::match_atparsing::syntax_definition::ContextReference::idparsing::syntax_definition::ContextReference::resolve
Other changes
- Fall back to
Plain Textif a referenced syntax is missing - Add support for
hidden_file_extensionskey in syntaxes. - Implement
ErrorandDisplayfor all error enums by usingthiserror - Replace
lazycellwithonce_cellto fix crash on lazy initialization - Add
ScopeRangeIterator - Add CI check for Minimum Supported Rust Version. This is currently Rust 1.53.
- Make looking up a syntax by extension use case-insensitive comparison
- Make
from_dump_file()~15% faster - Blend alpha value on converting colors to ANSI color sequences
- Fix sample code in documentation to avoid double newlines
- Fix lots of build warnings and lints
- Add Criterion benchmarks for a whole syntect pipeline and for
from_dump_file()
Patch of v4.7.0 without the semver violations that broke things
See the release notes for v4.7.0, this release removes a new Cargo feature which constituted a semver violation:
- Remove 'plist-load' feature again due to semver violation. #403
Much faster startup through lazy-loading, and much more!
Big release this time thanks to tons of fantastic contributions from @Enselic, this release was basically all him! The headline feature is much faster startup time due to lazy-loading at the syntax level.
- Lazy-load syntaxes to significantly improve startup time
- Remove
ContextId::new()from public API to support lazy-loading of syntaxes. This is technically a breaking change but I have no idea why I made this API public and I'm pretty sure zero people have used it. - Add
ScopeRangeIterator - Add CI check for Minimum Supported Rust Version. This is currently Rust 1.51.
- Make 'plist' dependency (used for loading themes) optional via new 'plist-load' feature
- Make looking up a syntax by extension use case-insensitive comparison
- Make from_dump_file() ~15% faster
- Blend alpha value on converting colors to ANSI color sequences
- Fix sample code in documentation to avoid double newlines
- Fix lots of build warnings and lints
- Add Criterion benchmarks for a whole syntect pipeline and for from_dump_file()
- Replace lazycell with once_cell to fix crash on lazy initialization
Fixes and new APIs
- Add
html::line_tokens_to_classed_spansto also take a mutable ScopeStack, deprecatetokens_to_classed_spans, to avoid panics and incorrect highlighting. - Derive Hash for Color and Style
- Add
find_unlinked_contextstoSyntaxSet - Add
syntaxesmethod toSyntaxSetBuilder - Bump
fancy-regexto v0.7 andyaml-rustto v0.4.5
A more correct classed HTML function
- Added a new function for producing classed HTML which handles newlines correctly and deprecated old one. #307
Cross-thread errors (+ feature and html fixes)
New onig and plist versions
- Updates to new versions of
onigandplist. The newonigversion doesn't requirebindgenthus making compilation easier. #293