Closed trusktr closed 4 years ago
There is a CommonMark specification and its reference implementation Cmark.
Github forked Cmark as Cmark-gfm and added their extensions there. (And added docs of the extension into a fork of the specification, see https://github.github.com/gfm/)
MD4C (the parser used under the hood of this project) is fully compliant to CommonMark specs as well, and it also implements all the Github's extensions as described in that documentation. However the description of those extensions is much less detailed then the original CommonMark specification so in some specific corner case the behavior is little bit more likely to differ then in the core features.
Also note that Github does some additional processing (outside the cmark-gfm code) to turn e.g. #123
into a link to Github issues etc. MD4C naturally does not do that at all.
EDIT: Forgot to mention one exception. cmark-gfm has an extension called Disallowed raw HTML which can filter only some HTML tags. MD4C does not have that, it only allows to turn raw HTML blocks/spans on or off completely. On the other side, AFAIK, GitHub site does not use that tag filter extension and instead they use some more powerful HTML sanitation lib or framework outside cmark-gfm, likely as a part of some post-processing of the Cmark-gfm output.
Nice project! I'm curious to know the differences. Thanks!