summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Wiesner <sebastian@swsnr.de>2019-03-26 07:46:24 +0100
committerSebastian Wiesner <sebastian@swsnr.de>2019-03-26 07:46:24 +0100
commita81471778edb7c04ae70e2ec28d25d66d8f09253 (patch)
tree2c5e539f9e42f982d80554e63ce1cd38fbd502c4
parent0c057a6de8e9148bcaffa17bc9eb2da9b6bdec11 (diff)
Cover new events and tags
-rw-r--r--src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index f8ca134..d1ecd5c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -485,6 +485,7 @@ fn write_event<'io, 'c, 'l, W: Write>(
}
Ok(ctx)
}
+ TaskListMarker(_) => panic!("mdcat does not support task lists"),
Start(tag) => start_tag(ctx, tag),
End(tag) => end_tag(ctx, tag),
Html(content) => {
@@ -511,6 +512,7 @@ fn start_tag<'io, 'c, 'l, W: Write>(
tag: Tag<'l>,
) -> Result<Context<'io, 'c, 'l, W>, Error> {
match tag {
+ HtmlBlock => panic!("mdcat does not support HTML blocks"),
Paragraph => ctx.start_inline_text()?,
Rule => {
ctx.start_inline_text()?;
@@ -584,6 +586,7 @@ fn start_tag<'io, 'c, 'l, W: Write>(
}
FootnoteDefinition(_) => panic!("mdcat does not support footnotes"),
Table(_) | TableHead | TableRow | TableCell => panic!("mdcat does not support tables"),
+ Strikethrough => panic!("mdcat does not support strikethrough"),
Emphasis => ctx.enable_emphasis(),
Strong => {
let style = ctx.style.current.bold();
@@ -658,6 +661,7 @@ fn end_tag<'io, 'c, 'l, W: Write>(
tag: Tag<'l>,
) -> Result<Context<'io, 'c, 'l, W>, Error> {
match tag {
+ HtmlBlock => panic!("mdcat does not support HTML blocks"),
Paragraph => ctx.end_inline_text_with_margin()?,
Rule => ctx.end_inline_text_with_margin()?,
Header(_) => {
@@ -702,6 +706,7 @@ fn end_tag<'io, 'c, 'l, W: Write>(
ctx.end_inline_text_with_margin()?
}
FootnoteDefinition(_) | Table(_) | TableHead | TableRow | TableCell => {}
+ Strikethrough => panic!("mdcat does not support strikethrough"),
Emphasis => {
ctx.drop_style();
ctx.style.emphasis_level -= 1;