fixup! 3b4b2e0259b2e84c8199c6f416e2c4f8d466e431
This commit is contained in:
parent
5e3d0e9666
commit
5755616870
2 changed files with 4 additions and 4 deletions
|
@ -77,8 +77,8 @@ impl<'s, I: Iterator<Item = Event<'s>>, W: std::fmt::Write> Writer<I, W> {
|
|||
Container::TableCell => self.out.write_str("<td>")?,
|
||||
Container::DescriptionTerm => self.out.write_str("<dt>")?,
|
||||
Container::RawBlock { .. } => todo!(),
|
||||
Container::CodeBlock { language } => {
|
||||
if let Some(l) = language {
|
||||
Container::CodeBlock { lang } => {
|
||||
if let Some(l) = lang {
|
||||
write!(self.out, r#"<pre><code class="language-{}">"#, l)?;
|
||||
} else {
|
||||
self.out.write_str("<pre><code>")?;
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue