Commit 2158b64a authored by Christopher Davis's avatar Christopher Davis 🌱

markdown: Enable highlighting during the initial load

Previously we did not enable syntax highlighting if the user
already had markdown enabled during startup. This commit
ensures that we enable it.

Closes #302
parent fba59402
Pipeline #96041 failed with stages
in 51 seconds
......@@ -43,6 +43,12 @@ impl App {
markdown_switch.set_active(true);
md_img.set_from_icon_name("format-indent-more-symbolic", gtk::IconSize::Menu);
txt.get_style_context().remove_class("dim-label");
if let Some(md_lang) = md_lang.clone() {
buffer.set_highlight_matching_brackets(true);
buffer.set_language(&md_lang);
buffer.set_highlight_syntax(true);
}
}
let op = op.clone();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment