Skip to content

Commit e4b39db

Browse files
committed
Clarify how to treat missing/invalid values
for `Description-Content-Type` (and `charset` and `variant`) as suggested by @ncoghlan at #258 (comment)
1 parent 33dc8c5 commit e4b39db

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

source/specifications.rst

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ the variant of Markdown in use, such as:
105105
- ``Original`` for `Gruber's original Markdown syntax
106106
<https://tools.ietf.org/html/rfc7763#section-6.1.4>`_
107107

108-
If the subtype is ``markdown`` and no ``variant`` is specified, then the
109-
implementation (e.g.: PyPI) should assume that the ``variant`` is
110-
``CommonMark``.
108+
If the subtype is ``markdown`` and no ``variant`` is specified or the specfied
109+
``variant`` is not recognized, then the implementation (e.g.: PyPI) should
110+
assume that the ``variant`` is ``CommonMark``.
111111

112112
Example::
113113

@@ -129,8 +129,15 @@ Example::
129129

130130
Description-Content-Type: text/markdown; charset=UTF-8; variant=Original
131131

132-
If a ``Description-Content-Type`` is not specified, then the assumed content type
133-
is ``text/x-rst; charset=UTF-8``.
132+
If a ``Description-Content-Type`` is not specified or it's set to an
133+
unrecognized value, then the assumed content type is ``text/x-rst;
134+
charset=UTF-8``.
135+
136+
If the ``charset`` is not specified or it's set to an unrecognized value, then
137+
the assumed ``charset`` is ``UTF-8``.
138+
139+
If the subtype is ``markdown`` and ``variant`` is not specified or it's set to
140+
an unrecognized value, then the assumed ``variant`` is ``CommonMark``.
134141

135142

136143
Version Specifiers

0 commit comments

Comments
 (0)