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

Make default Description-Content-Type variant GFM #462

Merged
merged 1 commit into from
Apr 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions source/specifications/core-metadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,11 @@ be ``UTF-8``.

Other parameters might be specific to the chosen subtype. For example, for the
``markdown`` subtype, there is an optional ``variant`` parameter that allows
specifying the variant of Markdown in use (defaults to ``CommonMark`` if not
specified). Currently, the only value that is recognized is:
specifying the variant of Markdown in use (defaults to ``GFM`` if not
specified). Currently, two variants are recognized:

- ``GFM`` for `Github-flavored Markdown
<https://tools.ietf.org/html/rfc7764#section-3.2>`_
- ``CommonMark`` for `CommonMark
<https://tools.ietf.org/html/rfc7764#section-3.5>`_

Expand All @@ -225,7 +227,7 @@ Example::

Example::

Description-Content-Type: text/markdown; charset=UTF-8; variant=CommonMark
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

Example::

Expand All @@ -241,10 +243,10 @@ with an unrecognized value).

If the ``Description-Content-Type`` is ``text/markdown`` and ``variant`` is not
specified or is set to an unrecognized value, then the assumed ``variant`` is
``CommonMark``.
``GFM``.

So for the last example above, the ``charset`` defaults to ``UTF-8`` and the
``variant`` defaults to ``CommonMark`` and thus it is equivalent to the example
``variant`` defaults to ``GFM`` and thus it is equivalent to the example
before it.


Expand Down
9 changes: 4 additions & 5 deletions source/tutorials/distributing-packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,9 @@ README.rst / README.md
All projects should contain a readme file that covers the goal of the project.
The most common format is `reStructuredText
<http://docutils.sourceforge.net/rst.html>`_ with an "rst" extension, although
this is not a requirement; the `CommonMark <http://spec.commonmark.org/>`_
dialect of `Markdown <https://daringfireball.net/projects/markdown/>`_ is
supported as well (look at ``setup()``'s :ref:`long_description_content_type
<description>` argument).
this is not a requirement; multiple variants of `Markdown
<https://daringfireball.net/projects/markdown/>`_ are supported as well (look
at ``setup()``'s :ref:`long_description_content_type <description>` argument).

For an example, see `README.md
<https://github.com/pypa/sampleproject/blob/master/README.md>`_ from the `PyPA
Expand Down Expand Up @@ -237,7 +236,7 @@ can be specified with the ``long_description_content_type`` argument, which can
be one of ``text/plain``, ``text/x-rst``, or ``text/markdown``, corresponding
to no formatting, `reStructuredText (reST)
<http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#reference-names>`_,
and the `CommonMark <http://spec.commonmark.org/>`_ dialect of `Markdown
and the Github-flavored Markdown dialect of `Markdown
<https://daringfireball.net/projects/markdown/>`_ respectively.

url
Expand Down