From 3febd81cbcadf7d36fd4686a5d323b31c44adf3a Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 10 Jun 2019 15:02:48 -0700 Subject: LaTeX writer: Use mbox to get proper behavior inside `\sout`. Closes #5529. --- test/Tests/Writers/LaTeX.hs | 2 +- test/command/5529.md | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 test/command/5529.md (limited to 'test') diff --git a/test/Tests/Writers/LaTeX.hs b/test/Tests/Writers/LaTeX.hs index 00150022f..4bf25fb1c 100644 --- a/test/Tests/Writers/LaTeX.hs +++ b/test/Tests/Writers/LaTeX.hs @@ -81,7 +81,7 @@ tests = [ testGroup "code blocks" , "struck out and not highlighted" =: strikeout (code "foo" <> space <> str "bar") =?> - "\\sout{\\texttt{foo} bar}" + "\\sout{\\mbox{\\texttt{foo}} bar}" , "single quotes" =: code "dog's" =?> "\\texttt{dog\\textquotesingle{}s}" , "backtick" =: diff --git a/test/command/5529.md b/test/command/5529.md new file mode 100644 index 000000000..fcecd9b1f --- /dev/null +++ b/test/command/5529.md @@ -0,0 +1,10 @@ +``` +% pandoc -t latex +~~`hello world`~~ + +~~_`hello world`_~~ +^D +\sout{\mbox{\texttt{hello\ world}}} + +\sout{\emph{\mbox{\texttt{hello\ world}}}} +``` -- cgit v1.2.3