1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00

update syntect

This commit is contained in:
Emil Ernerfeldt
2022-07-03 18:37:37 +02:00
parent 7db87b56db
commit bfb5c4bdf2
3 changed files with 6 additions and 5 deletions

View File

@@ -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]

View File

@@ -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);