Skip to content

Commit

Permalink
Fix warning directive rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
melissawm committed Dec 29, 2023
1 parent 3de0911 commit 1eb819f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion papyri/tests/test_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def test_parse_warning_directive():
.. warning:: Title
The warning directive does not admit a title.
Just testing now.
"""
)
Expand All @@ -108,7 +109,7 @@ def test_parse_warning_directive():
assert items[0].name == "warning"
assert items[0].args == ""
assert items[0].options == dict()
assert items[0].value == "Title The warning directive does not admit a title."
assert items[0].value == "Title The warning directive does not admit a title.\nJust testing now."
assert items[0].children == []


Expand Down
2 changes: 1 addition & 1 deletion papyri/ts.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ def visit_directive(self, node):
raise ValueError(f"{role} directive has no content")

padding = (content_node[0].start_point[1] - _1.start_point[1]) * " "
content = dedent(padding + content)
content = dedent(padding + content).lstrip(" ")
argument = ""
options = []
groups = []
Expand Down

0 comments on commit 1eb819f

Please sign in to comment.