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

Replace gfm with commonmark #11

Merged
merged 1 commit into from
Oct 1, 2021
Merged

Replace gfm with commonmark #11

merged 1 commit into from
Oct 1, 2021

Conversation

gordonbrander
Copy link
Owner

Fixes #8.

GFM doesn't ignore inline HTML when rendering, and will produce bugs,
such as re-hrefing the href in a link tag.

GFM has essentially been abandoned. This PR replaces it with commonmark,
which implements Common Markdown (https://commonmark.org/).

Pros:

  • Commonmark is maintained by readthedocs, so is a good bet in terms of
    code durability.
  • Edge-cases in CommonMark are well-specified.
  • The library generates an AST, which we could use for enhancements
    later.

Cons:

  • No auto-linking of bare URLs. You need to wrap URLs in
  • No br for soft linebreaks. you will need to add two spaces at the end
    of the line to create a BR.

Fixes #8.

GFM doesn't ignore inline HTML when rendering, and will produce bugs,
such as re-hrefing the href in a link tag.

GFM has essentially been abandoned. This PR replaces it with commonmark,
which implements Common Markdown (https://commonmark.org/).

Pros:

- Commonmark is maintained by readthedocs, so is a good bet in terms of
code durability.
- Edge-cases in CommonMark are well-specified.
- The library generates an AST, which we could use for enhancements
  later.

Cons:

- No auto-linking of bare URLs. You need to wrap URLs in <brackets>
- No br for soft linebreaks. you will need to add two spaces at the end
  of the line to create a BR.
@gordonbrander gordonbrander merged commit 96ddaf1 into master Oct 1, 2021
@gordonbrander gordonbrander deleted the markdown_upgrade branch October 1, 2021 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GFM re-hrefs the href
1 participant