fix: add line break after LaTeX comment
This commit is contained in:
@@ -30,7 +30,7 @@ class FiftyOhmLaTeXRenderer(LaTeXRenderer):
|
|||||||
return " -- "
|
return " -- "
|
||||||
|
|
||||||
def render_block_comment(self, token):
|
def render_block_comment(self, token):
|
||||||
return f"% {token.content}"
|
return f"% {token.content}\n"
|
||||||
|
|
||||||
def render_quote(self, token):
|
def render_quote(self, token):
|
||||||
return rf"\enquote{{{self.render_inner(token)}}}"
|
return rf"\enquote{{{self.render_inner(token)}}}"
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ def test_comment_html():
|
|||||||
@pytest.mark.latex
|
@pytest.mark.latex
|
||||||
def test_comment_latex():
|
def test_comment_latex():
|
||||||
assertions = {
|
assertions = {
|
||||||
"%Comment\nBar": "% Comment\nBar\n",
|
"%Comment\nBar": "% Comment\n\nBar\n",
|
||||||
"%Comment\n": "% Comment",
|
"%Comment\n": "% Comment\n",
|
||||||
"Foo 100 % Bar": "\nFoo 100 \% Bar\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:
|
for assertion in assertions:
|
||||||
|
|||||||
Reference in New Issue
Block a user