Change option to newline_style and use variables like heading_style does

This commit is contained in:
André van Delft
2021-04-05 10:44:20 +02:00
parent 8da0bdf998
commit c04ec855dd
2 changed files with 7 additions and 4 deletions

View File

@@ -78,8 +78,8 @@ bullets
strong_em_symbol
In markdown, both ``*`` and ``_`` are used to encode **strong** or *emphasized* texts. The preferred symbol can be passed through this argument, that defaults to ``*``.
newline
Defines the style of marking linebreaks (``<br>``) in markdown. The default value ``'spaces'`` of this option means the regular `` \n`` will be used (i.e. two spaces and a newline), while ``'backslash'`` will convert a linebreak to ``\\n`` (a backslash an a newline). While the latter convention is non-standard, it is commonly preferred and supported by a lot of interpreters.
newline_style
Defines the style of marking linebreaks (``<br>``) in markdown. The default value ``SPACES`` of this option means the regular `` \n`` will be used (i.e. two spaces and a newline), while ``BACKSLASH`` will convert a linebreak to ``\\n`` (a backslash an a newline). While the latter convention is non-standard, it is commonly preferred and supported by a lot of interpreters.
Options may be specified as kwargs to the ``markdownify`` function, or as a
nested ``Options`` class in ``MarkdownConverter`` subclasses.