Skip to content

Commit 1252354

Browse files
diJon Wayne Parrott
authored andcommitted
Make default Description-Content-Type variant GFM (#462)
1 parent d3e573d commit 1252354

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

‎source/specifications/core-metadata.rst‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,11 @@ be ``UTF-8``.
209209

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

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

@@ -225,7 +227,7 @@ Example::
225227

226228
Example::
227229

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

230232
Example::
231233

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

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

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

250252

‎source/tutorials/distributing-packages.rst‎

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

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

243242
url

0 commit comments

Comments
 (0)