How to insert a blank line? #493
-
Add detailed information, like
How can I put some text in my docstring to a new line?
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
Two solutions:
|
Beta Was this translation helpful? Give feedback.
-
Trailing spaces will automatically be removed by using the
This seems to be working, however, it pollutes the docstring. For example, using Inserting a blank line in the docstring seems to be translated to a regular new line when generating the online docs using |
Beta Was this translation helpful? Give feedback.
-
Could you see if there's an issue for this on their tracker? And otherwise open one? |
Beta Was this translation helpful? Give feedback.
-
Found one: psf/black#3306 |
Beta Was this translation helpful? Give feedback.
-
The CommonMark spec says that we can use a backslash for hard line breaks. Unfortunately it seems that Python-Markdown does not support it. |
Beta Was this translation helpful? Give feedback.
It has been asked before: Python-Markdown/markdown#1157.
Suggested solution: use the
pymdownx.escapeall
extension, with thehardbreak
option enabled: