From f9dbfb9888b438b915119d31bdb8db0319a35461 Mon Sep 17 00:00:00 2001 From: Nokome Bentley Date: Tue, 31 Aug 2021 11:50:38 +1200 Subject: [PATCH] fix(HTML): Use consistent attribute name for programming language --- rust/src/methods/decode/html.rs | 2 +- rust/src/methods/encode/html.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/src/methods/decode/html.rs b/rust/src/methods/decode/html.rs index 12ddf5a795..a422b9026b 100644 --- a/rust/src/methods/decode/html.rs +++ b/rust/src/methods/decode/html.rs @@ -90,7 +90,7 @@ fn decode_block(node: &NodeRef, context: &Context) -> Vec { let programming_language = if let Some(lang) = element .attributes .borrow() - .get(LocalName::from("data-programminglanguage")) + .get(LocalName::from("programming-language")) { lang.to_string() } else { diff --git a/rust/src/methods/encode/html.rs b/rust/src/methods/encode/html.rs index a802c71036..814ae4b9ea 100644 --- a/rust/src/methods/encode/html.rs +++ b/rust/src/methods/encode/html.rs @@ -657,7 +657,7 @@ impl ToHtml for CodeChunk { ">", &label, r#"
"#,
                         &encode_safe(&self.text),
                     "
",