mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 21:30:03 -04:00
update syntect
This commit is contained in:
7
Cargo.lock
generated
7
Cargo.lock
generated
@@ -3559,9 +3559,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syntect"
|
name = "syntect"
|
||||||
version = "4.6.0"
|
version = "5.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8b20815bbe80ee0be06e6957450a841185fcf690fe0178f14d77a05ce2caa031"
|
checksum = "c6c454c27d9d7d9a84c7803aaa3c50cd088d2906fe3c6e42da3209aa623576a8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode",
|
"bincode",
|
||||||
"bitflags",
|
"bitflags",
|
||||||
@@ -3569,12 +3569,13 @@ dependencies = [
|
|||||||
"flate2",
|
"flate2",
|
||||||
"fnv",
|
"fnv",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"lazycell",
|
"once_cell",
|
||||||
"plist",
|
"plist",
|
||||||
"regex-syntax",
|
"regex-syntax",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
|
"thiserror",
|
||||||
"walkdir",
|
"walkdir",
|
||||||
"yaml-rust",
|
"yaml-rust",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ chrono = { version = "0.4", optional = true, features = ["js-sys", "wasmbind"] }
|
|||||||
## Enable this when generating docs.
|
## Enable this when generating docs.
|
||||||
document-features = { version = "0.2", optional = true }
|
document-features = { version = "0.2", optional = true }
|
||||||
serde = { version = "1", optional = true, features = ["derive"] }
|
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]
|
[dev-dependencies]
|
||||||
|
|||||||
@@ -350,7 +350,7 @@ impl Highlighter {
|
|||||||
};
|
};
|
||||||
|
|
||||||
for line in LinesWithEndings::from(text) {
|
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 fg = style.foreground;
|
||||||
let text_color = egui::Color32::from_rgb(fg.r, fg.g, fg.b);
|
let text_color = egui::Color32::from_rgb(fg.r, fg.g, fg.b);
|
||||||
let italics = style.font_style.contains(FontStyle::ITALIC);
|
let italics = style.font_style.contains(FontStyle::ITALIC);
|
||||||
|
|||||||
Reference in New Issue
Block a user