Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert-policy.py and Markdown #291

Closed
annevk opened this issue Mar 6, 2020 · 4 comments
Closed

convert-policy.py and Markdown #291

annevk opened this issue Mar 6, 2020 · 4 comments

Comments

@annevk
Copy link
Member

annevk commented Mar 6, 2020

  • The only affect of from mdx_partial_gfm import PartialGithubFlavoredMarkdownExtension appears to be the auto-linking of the email address in the Code of Conduct. We could consider replacing it with something simpler that handles email addresses.
  • Adopting commonmark would require some restructuring of the code as it doesn't like some of the pre-processing we do. It ends up wrapping our headings with paragraphs and also encodes a bunch of " as ".

It's not clear that making either is worth it.

@domenic
Copy link
Member

domenic commented Mar 6, 2020

I think Commonmark is worth a lot just in being the same as GitHub and helping the Markdown ecosystem converge toward a single spec.

@annevk
Copy link
Member Author

annevk commented Mar 7, 2020

Could it be that the Python commonmark package is wrong? https://spec.commonmark.org/ behaves very similar to the markdown package we are using, especially for input such as

<h3>...</h3>
test

or

<h3>...</h3>

test

whereas if I try that locally with the commonmark package the <h3> ends up wrapped in a <p>.

@domenic
Copy link
Member

domenic commented Mar 7, 2020

That could be possible, if distressing :(. Although as I noted in whatwg/sg#92 (comment) I'm unsure why our input contains <h3>s anyway, instead of ###.

@annevk
Copy link
Member Author

annevk commented Mar 7, 2020

That's what convert-policy does. We could possibly change it to do post-HTML-conversion changes. That would also fix #145. But I don't think I've really seen where commonmark and markdown give different results yet. Other than that commonmark didn't do email address auto-linking. (Perhaps it needs to be wrapped inside angle brackets.)

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

No branches or pull requests

2 participants