mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 15:13:12 -04:00
update syntect
This commit is contained in:
7
Cargo.lock
generated
7
Cargo.lock
generated
@@ -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",
|
||||
]
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user