Skip to content
This repository has been archived by the owner on Jul 30, 2023. It is now read-only.

Way to disable specific features? #9

Closed
rhyst opened this issue Feb 23, 2017 · 5 comments
Closed

Way to disable specific features? #9

rhyst opened this issue Feb 23, 2017 · 5 comments

Comments

@rhyst
Copy link

rhyst commented Feb 23, 2017

Is there a way to disable for example "Literal line breaks"?

@zopieux
Copy link
Owner

zopieux commented Feb 23, 2017

@rhyst Just create your own instance of Markdown with the full list of extensions you want to include, instead of the big GithubFlavoredMarkdownExtension one that gathers the others.

There is a dedicated section for that in the docs.

@zopieux zopieux closed this as completed Feb 23, 2017
@rhyst
Copy link
Author

rhyst commented Feb 23, 2017

Ah, thanks. I was confused because there doesn't seem to be an extension for the literal line breaks.

@tomjaguarpaw
Copy link

I'm confused too. What do you have to omit to disable literal line breaks?

@tomjaguarpaw
Copy link

It seems to be this that converts new line to line breaks: https://github.com/Zopieux/py-gfm/blob/cf931b47031b68e34fd5c88e6da28fabe179adb4/mdx_gfm/__init__.py#L54

"Nl2Br" presumably stands for "new line to line break".

@tomjaguarpaw
Copy link

To be specific, the way you get GitHub flavoured Markdown with py-gfm to omit hard line breaks is

markdown.Markdown(extensions=[PartialGithubFlavoredMarkdownExtension()])

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants