mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 05:10:03 -04:00
update syntect
This commit is contained in:
@@ -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