Where is GitHub Flavored Markdown (GFM) actually used in GitHub?

后端 未结 3 547
野趣味
野趣味 2021-01-05 07:06

This has been a mystery to me for a while, and for some reason Google didn\'t help me, so let me ask.

EDIT: ok, I understand the GFM is everywhere in GitHub, and wh

3条回答
  •  猫巷女王i
    2021-01-05 07:14

    Contrary to the other answers, GFM is only used where text is only entered through the GitHub website, not in README.md and not on GitHub Wikis.

    From https://help.github.com/articles/github-flavored-markdown (emphasis added)

    GitHub uses what we're calling "GitHub Flavored Markdown" (GFM) for messages, issues, and comments.

    The reasoning behind this is that README.md and Wikis are part of Git repositories, and therefore can be cloned outside of the site, where one would reasonably expect (standard) Markdown rather than GFM.

    For more on GitHub's rationale, see https://github.com/github/markup/issues/208#issuecomment-24927799

    Edit:

    Syntax highlighting (Pygments) is separate from GFM, in that, GFM employs syntax highlighting, however the presence of syntax highlighting does not entail GFM, hence why GitHub Pages will use standard Markdown line-breaks: it uses Pygments, but not GFM.

提交回复
热议问题