fixup! 1878a26deb818a3283eba4d8db3278535cea298c

This commit is contained in:
Noah Hellman 2022-12-01 20:34:23 +01:00
parent d4214ce431
commit 3672a03a0c
2 changed files with 6 additions and 0 deletions

View file

@ -75,6 +75,7 @@ impl<'s, I: Iterator<Item = Event<'s>>, W: std::fmt::Write> Writer<I, W> {
Container::Link(..) => todo!(),
Container::Image(..) => todo!(),
Container::TableCell => self.out.write_str("<td>")?,
Container::DescriptionTerm => self.out.write_str("<dt>")?,
Container::RawBlock { .. } => todo!(),
Container::CodeBlock { .. } => todo!(),
Container::Subscript => self.out.write_str("<sub>")?,
@ -106,6 +107,7 @@ impl<'s, I: Iterator<Item = Event<'s>>, W: std::fmt::Write> Writer<I, W> {
Container::Paragraph => self.out.write_str("</p>")?,
Container::Heading { level } => write!(self.out, "</h{}>", level)?,
Container::TableCell => self.out.write_str("</td>")?,
Container::DescriptionTerm => self.out.write_str("</dt>")?,
Container::RawBlock { .. } => todo!(),
Container::CodeBlock { .. } => todo!(),
Container::Link(..) => todo!(),

View file

@ -60,6 +60,8 @@ pub enum Container<'s> {
Span,
/// A cell element of row within a table.
TableCell,
/// A term within a description list.
DescriptionTerm,
/// A block with raw markup for a specific output format.
RawBlock { format: &'s str },
/// A block with code in a specific language.
@ -99,6 +101,7 @@ impl<'s> Container<'s> {
| Self::Div
| Self::Paragraph
| Self::Heading { .. }
| Self::DescriptionTerm
| Self::TableCell
| Self::RawBlock { .. }
| Self::CodeBlock { .. } => true,
@ -132,6 +135,7 @@ impl<'s> Container<'s> {
Self::Paragraph
| Self::Heading { .. }
| Self::TableCell
| Self::DescriptionTerm
| Self::RawBlock { .. }
| Self::CodeBlock { .. }
| Self::Span