Closed AUVESY-Nachwuchskraefte closed 3 months ago
@AUVESY-Nachwuchskraefte Python Markdown is an old-school Markdown parser that predates CommonMark. It is not a CommonMark parser, so any expectations that it should adhere to the CommonMark spec need to be set aside.
With that said, you can get the behavior you are looking for with this extension: https://facelessuser.github.io/pymdown-extensions/extensions/escapeall/.
As our documentation notes:
This is not a CommonMark implementation; nor is it trying to be! Python-Markdown was developed long before the CommonMark specification was released and has always (mostly) followed the syntax rules and behavior of the original reference implementation. No accommodations have been made to address the changes which CommonMark has suggested. It is recommended that you look elsewhere if you want an implementation which follows the CommonMark specification.
Note that backslash escapes are only applied to a subset of characters as defined in the rules and a newline is not one of them (see BACKSLASH ESCAPES). Therefore, there should be no expectation that a backslash escape would have any effect on a newline character. Instead, the rules provide for a hard break by preceding a newline with two or more spaces (see PARAGRAPHS AND LINE BREAKS).
Given the above, this is being closed as wontfix.
Thank you for your response, I overlooked the "note" in your documentation.
@facelessuser thanks for your provided solution, I will try it.
good morning everyone!
when trying to render linebreaks within paragraphs with a backslash at the end of the line as in the spec the backslash will not be used as a formatting character but stay as is.