diff --git a/src/html.rs b/src/html.rs index f74b5c4..e3e0d10 100644 --- a/src/html.rs +++ b/src/html.rs @@ -77,8 +77,8 @@ impl<'s, I: Iterator>, W: std::fmt::Write> Writer { Container::TableCell => self.out.write_str("")?, Container::DescriptionTerm => self.out.write_str("
")?, Container::RawBlock { .. } => todo!(), - Container::CodeBlock { language } => { - if let Some(l) = language { + Container::CodeBlock { lang } => { + if let Some(l) = lang { write!(self.out, r#"
"#, l)?;
                             } else {
                                 self.out.write_str("
")?;
diff --git a/src/lib.rs b/src/lib.rs
index ea0766f..dcd5362 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -59,7 +59,7 @@ pub enum Container<'s> {
     /// A block with raw markup for a specific output format.
     RawBlock { format: &'s str },
     /// A block with code in a specific language.
-    CodeBlock { language: Option<&'s str> },
+    CodeBlock { lang: Option<&'s str> },
     /// An inline divider element.
     Span,
     /// An inline link with a destination URL.
@@ -273,7 +273,7 @@ impl<'s> Container<'s> {
             block::Block::Leaf(l) => match l {
                 block::Leaf::Paragraph => Self::Paragraph,
                 block::Leaf::Heading { level } => Self::Heading { level },
-                block::Leaf::CodeBlock { .. } => Self::CodeBlock { language: None },
+                block::Leaf::CodeBlock { .. } => Self::CodeBlock { lang: None },
                 _ => todo!(),
             },
             block::Block::Container(c) => match c {