github / cmark-gfm

GitHub's fork of cmark, a CommonMark parsing and rendering library and program in C
Other
909 stars 175 forks source link

Update documentation to state GitHub's soft break parsing behavoir #344

Open rickstaa opened 1 year ago

rickstaa commented 1 year ago

It seems that GitHub, for user convenience, automatically parses regular line breaks as hard line breaks in issues, discussion and pull request comments (see https://github.com/orgs/community/discussions/16925?sort=new#discussioncomment-6507284). For repository markdown files, however, these regular line breaks are parsed as soft line breaks. Although I understand it is impossible to align this behaviour among markdown issues, discussion, and pull request comments. We should document them on https://github.github.com/gfm/ under the Soft line breaks section. Something like

Note For user convenience in Github issues, pull requests and discussion comments, regular line breaks are automatically replaced by hard line breaks.

I'm happy to create a pull request but I couldn't find where and how this documentation is created.

Related to

wooorm commented 1 year ago

It's not something they do in their markdown parser as far as I understand , and there are many many other features like that, which they do on issues/prs/discussions/comments, which are already (sparsely) documented in their regular docs (https://docs.github.com/en/get-started/writing-on-github)

rickstaa commented 1 year ago

It's not something they do in their markdown parser as far as I understand , and there are many many other features like that, which they do on issues/prs/discussions/comments, which are already (sparsely) documented in their regular docs (https://docs.github.com/en/get-started/writing-on-github)

@wooorm Thanks for the clarification and for the source that should document this 🙏🏻! @dipree, we can also add it to https://docs.github.com/en/get-started/writing-on-github when the admonitions feature comes out of beta?