1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:17:45 +00:00

LibMarkdown: Add strike-through text support to markdown

Using ~~text~~ syntax will strike out the text between the two tildes.

Only missing portion is the terminal rendering of strike through text.
The ansi escape codes for strike through text are \e[9m and \e[29m but
it appears the terminal does not support these. Please correct me if I
am wrong.

I tested that the render_to_terminal function was being called by giving
it bold ANSI escape codes, and that did work so the function is being
called correctly.
This commit is contained in:
huttongrabiel 2022-04-26 21:34:29 -07:00 committed by Andreas Kling
parent 45f3fffbad
commit 25970f2763
3 changed files with 88 additions and 3 deletions

View file

@ -44,6 +44,7 @@ public:
virtual RecursionDecision visit(Text::EmphasisNode const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(Text::LinkNode const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(Text::MultiNode const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(Text::StrikeThroughNode const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(Text::TextNode const&) { return RecursionDecision::Recurse; }
virtual RecursionDecision visit(String const&) { return RecursionDecision::Recurse; }