summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2018-07-14 15:20:21 +0200
committerBastien Nocera <hadess@hadess.net>2018-07-16 13:07:22 +0200
commit02597c16914155cd16b22992ad57f49825bd835e (patch)
treed14f4a7c943845f4b8a39896ce01270083e4bfa7
parent111d3397ceb17df166ec316d86a68cf56e927f00 (diff)
downloadshared-mime-info-02597c16914155cd16b22992ad57f49825bd835e.tar.gz
Add MIME type for reStructuredText (text/x-rst)
https://bugs.freedesktop.org/show_bug.cgi?id=107227
-rw-r--r--freedesktop.org.xml.in5
-rw-r--r--tests/list2
-rw-r--r--tests/reStructuredText.rst68
3 files changed, 75 insertions, 0 deletions
diff --git a/freedesktop.org.xml.in b/freedesktop.org.xml.in
index 2828a6e4..6c7b1ace 100644
--- a/freedesktop.org.xml.in
+++ b/freedesktop.org.xml.in
@@ -5636,6 +5636,11 @@ command to generate the output files.
<glob pattern="*.owl"/>
<root-XML namespaceURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#" localName="RDF"/>
</mime-type>
+ <mime-type type="text/x-rst">
+ <_comment>reStructuredText document</_comment>
+ <sub-class-of type="text/plain"/>
+ <glob pattern="*.rst"/>
+ </mime-type>
<mime-type type="application/owl+xml">
<_comment>OWL XML file</_comment>
<acronym>OWL</acronym>
diff --git a/tests/list b/tests/list
index 3dab2032..fb1b9336 100644
--- a/tests/list
+++ b/tests/list
@@ -586,6 +586,8 @@ test10.gpx application/gpx+xml ox
test.gnd application/gnunet-directory
# Copied from https://bugs.freedesktop.org/show_bug.cgi?id=27441
markdown.md text/markdown oxo
+# Manually assembled from formatting examples at https://en.wikipedia.org/wiki/ReStructuredText
+reStructuredText.rst text/x-rst ox
text.ps application/postscript
text.ps.gz application/x-gzpostscript ox
text.PS.gz application/x-gzpostscript oxo
diff --git a/tests/reStructuredText.rst b/tests/reStructuredText.rst
new file mode 100644
index 00000000..72b0049b
--- /dev/null
+++ b/tests/reStructuredText.rst
@@ -0,0 +1,68 @@
+Examples from Wikipedia page
+============================
+
+Lists
+-----
+
+- A bullet list item
+- Second item
+
+ - A sub item
+
+- Spacing between items creates separate lists
+
+- Third item
+
+1) An enumerated list item
+
+2) Second item
+
+ a) Sub item that goes on at length and thus needs
+ to be wrapped. Note the indentation that must
+ match the beginning of the text, not the
+ enumerator.
+
+ i) List items can even include
+
+ paragraph breaks.
+
+3) Third item
+
+#) Another enumerated list item
+
+#) Second item
+
+Images
+------
+
+.. image:: /path/to/image.jpg
+
+Named links
+-----------
+
+A sentence with links to Wikipedia_ and the `Linux kernel archive`_.
+
+.. _Wikipedia: https://www.wikipedia.org/
+.. _Linux kernel archive: https://www.kernel.org/
+
+Anonymous links
+---------------
+
+Another sentence with an `anonymous link to the Python website`__.
+
+__ https://www.python.org/
+
+Literal blocks
+--------------
+
+::
+
+ some literal text
+
+This may also be used inline at the end of a paragraph, like so::
+
+ some more literal text
+
+.. code:: python
+
+ print("A literal block directive explicitly marked as python code")