-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix markdown "break on newline" configurability (#236)
Previously, `"break-on-newline": True` was part of the default markdown options. The user could override the configuration value, thus turning it into `"break-on-newline": False`, but unfortunately the markdown2 library ignores the value of the option, and always sets it to `True` if the key is passed in. The `break-on-newline` extra is deprecated, there is a new option since 2.4.11: `breaks` https://github.com/trentm/python-markdown2/wiki/breaks Unfortunately, markdown2 overrides the `breaks.on_newline` configuration if `break-on-newline` is present in the extras, meaning that this doesn't work for disabling "break on newline" either. This means that right now there is _no_ way for the users of jsfh to disable line breaks on newlines. To fix this, remove `break-on-newline` from the default markdown options. If (and only if) the `breaks` config is _not_ set by the user, a `breaks` config is added to the defaults that inserts line breaks on newlines by default. --------- Co-authored-by: Denis Blanchette <[email protected]>
- Loading branch information
1 parent
11ede01
commit c0c9d09
Showing
10 changed files
with
64 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.