mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 09:10:08 +00:00
rename variables
This commit is contained in:
parent
0276e92c5c
commit
4e50621e3c
@ -20,28 +20,30 @@ pub fn format(source_code: &str) -> Vec<(TextTag, String)> {
|
|||||||
let tag = Tag::new();
|
let tag = Tag::new();
|
||||||
|
|
||||||
// Apply supported decorations
|
// Apply supported decorations
|
||||||
if let Some(fg) = entity.fg {
|
if let Some(color) = entity.fg {
|
||||||
tag.text_tag.set_foreground_rgba(Some(&color_to_rgba(fg)));
|
tag.text_tag
|
||||||
|
.set_foreground_rgba(Some(&color_to_rgba(color)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(bg) = entity.bg {
|
if let Some(color) = entity.bg {
|
||||||
tag.text_tag.set_background_rgba(Some(&color_to_rgba(bg)));
|
tag.text_tag
|
||||||
|
.set_background_rgba(Some(&color_to_rgba(color)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(italic) = entity.italic {
|
if let Some(is_italic) = entity.italic {
|
||||||
if italic {
|
if is_italic {
|
||||||
tag.text_tag.set_style(Style::Italic);
|
tag.text_tag.set_style(Style::Italic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(underline) = entity.underline {
|
if let Some(is_underline) = entity.underline {
|
||||||
if underline {
|
if is_underline {
|
||||||
tag.text_tag.set_underline(Underline::Single);
|
tag.text_tag.set_underline(Underline::Single);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(strikethrough) = entity.strikethrough {
|
if let Some(is_strikethrough) = entity.strikethrough {
|
||||||
tag.text_tag.set_strikethrough(strikethrough);
|
tag.text_tag.set_strikethrough(is_strikethrough);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Append
|
// Append
|
||||||
|
Loading…
x
Reference in New Issue
Block a user