diff --git a/Cargo.lock b/Cargo.lock index 11e86009d..f5ccbcaa0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3559,9 +3559,9 @@ dependencies = [ [[package]] name = "syntect" -version = "4.6.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b20815bbe80ee0be06e6957450a841185fcf690fe0178f14d77a05ce2caa031" +checksum = "c6c454c27d9d7d9a84c7803aaa3c50cd088d2906fe3c6e42da3209aa623576a8" dependencies = [ "bincode", "bitflags", @@ -3569,12 +3569,13 @@ dependencies = [ "flate2", "fnv", "lazy_static", - "lazycell", + "once_cell", "plist", "regex-syntax", "serde", "serde_derive", "serde_json", + "thiserror", "walkdir", "yaml-rust", ] diff --git a/egui_demo_lib/Cargo.toml b/egui_demo_lib/Cargo.toml index 0f1901748..7253748b0 100644 --- a/egui_demo_lib/Cargo.toml +++ b/egui_demo_lib/Cargo.toml @@ -41,7 +41,7 @@ chrono = { version = "0.4", optional = true, features = ["js-sys", "wasmbind"] } ## Enable this when generating docs. document-features = { version = "0.2", optional = true } serde = { version = "1", optional = true, features = ["derive"] } -syntect = { version = "4", optional = true, default-features = false, features = ["default-fancy"] } +syntect = { version = "5", optional = true, default-features = false, features = ["default-fancy"] } [dev-dependencies] diff --git a/egui_demo_lib/src/syntax_highlighting.rs b/egui_demo_lib/src/syntax_highlighting.rs index 086b20fa6..62c3625e3 100644 --- a/egui_demo_lib/src/syntax_highlighting.rs +++ b/egui_demo_lib/src/syntax_highlighting.rs @@ -350,7 +350,7 @@ impl Highlighter { }; for line in LinesWithEndings::from(text) { - for (style, range) in h.highlight(line, &self.ps) { + for (style, range) in h.highlight_line(line, &self.ps) { let fg = style.foreground; let text_color = egui::Color32::from_rgb(fg.r, fg.g, fg.b); let italics = style.font_style.contains(FontStyle::ITALIC);