fix: add line break after LaTeX comment

This commit is contained in:
Tim Grelka
2025-02-16 17:56:26 +01:00
parent fe7ded0278
commit fa3ba2973b
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ class FiftyOhmLaTeXRenderer(LaTeXRenderer):
return " -- "
def render_block_comment(self, token):
return f"% {token.content}"
return f"% {token.content}\n"
def render_quote(self, token):
return rf"\enquote{{{self.render_inner(token)}}}"
+3 -3
View File
@@ -23,10 +23,10 @@ def test_comment_html():
@pytest.mark.latex
def test_comment_latex():
assertions = {
"%Comment\nBar": "% Comment\nBar\n",
"%Comment\n": "% Comment",
"%Comment\nBar": "% Comment\n\nBar\n",
"%Comment\n": "% Comment\n",
"Foo 100 % Bar": "\nFoo 100 \% Bar\n",
"Foo\n%Comment\nBar": "\nFoo\n% Comment\nBar\n",
"Foo\n%Comment\nBar": "\nFoo\n% Comment\n\nBar\n",
}
for assertion in assertions: