feature: add latex quote

This commit is contained in:
Prof. Dr. Matthias Jung DL9MJ
2024-12-08 16:58:04 +01:00
parent 39bce3252a
commit 2acf620bd5
+15
View File
@@ -1,6 +1,7 @@
import mistletoe
from renderer.fifty_ohm_html_renderer import FiftyOhmHtmlRenderer
from renderer.fifty_ohm_latex_renderer import FiftyOhmLaTeXRenderer
from test.util import paragraph
@@ -17,3 +18,17 @@ def test_quote_html() :
for assertion in assertions:
assert mistletoe.markdown(assertion, FiftyOhmHtmlRenderer) == paragraph(assertions[assertion])
def test_quote_latex() :
assertions = {
'"quote"' : '\n\enquote{quote}\n',
'" quote "' : '\n\enquote{ quote }\n',
'"quote" "' : '\n\enquote{quote} "\n',
'"quo te1" filltext "qu ot e2"' : '\n\enquote{quo te1} filltext \enquote{qu ot e2}\n',
'"quo *te1*" filltext "qu ot e2"' : '\n\enquote{quo \emph{te1}} filltext \enquote{qu ot e2}\n',
'""' : '\n""\n',
}
for assertion in assertions:
assert mistletoe.markdown(assertion, FiftyOhmLaTeXRenderer) == assertions[assertion]