summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 7d26707..d860b86 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -589,7 +589,10 @@ 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"),
+ Strikethrough => {
+ let style = ctx.style.current.strikethrough();
+ ctx.set_style(style)
+ }
Emphasis => ctx.enable_emphasis(),
Strong => {
let style = ctx.style.current.bold();
@@ -709,7 +712,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"),
+ Strikethrough => ctx.drop_style(),
Emphasis => {
ctx.drop_style();
ctx.style.emphasis_level -= 1;