{
+ Event::Start(Tag::CodeBlock(ref kind)) => {
if !context.config.highlight_code {
return Event::Html("".into());
}
let theme = &THEME_SET.themes[&context.config.highlight_theme];
- highlighter = Some(get_highlighter(info, &context.config));
+ match kind {
+ CodeBlockKind::Indented => (),
+ CodeBlockKind::Fenced(info) => {
+ highlighter = Some(get_highlighter(info, &context.config));
+ }
+ };
// This selects the background color the same way that start_coloured_html_snippet does
let color = theme
.settings
diff --git a/components/templates/Cargo.toml b/components/templates/Cargo.toml
index 433178b..a5fdfea 100644
--- a/components/templates/Cargo.toml
+++ b/components/templates/Cargo.toml
@@ -8,10 +8,10 @@ edition = "2018"
tera = "1"
base64 = "0.11"
lazy_static = "1"
-pulldown-cmark = "0.6"
+pulldown-cmark = "0.7"
toml = "0.5"
csv = "1"
-image = "0.22"
+image = "0.23"
serde_json = "1.0"
reqwest = { version = "0.10", features = ["blocking"] }
url = "2"
@@ -23,4 +23,4 @@ config = { path = "../config" }
imageproc = { path = "../imageproc" }
[dev-dependencies]
-mockito = "0.22"
+mockito = "0.23"