Change the source parsers feature a bit:

* parsers -> source_parsers
* add docs
* require fully qualified name or class
* add test for it
This commit is contained in:
Georg Brandl
2015-03-08 13:11:28 +01:00
parent 0cb9b1db02
commit ad612fb03d
12 changed files with 65 additions and 36 deletions

View File

@@ -92,6 +92,19 @@ General configuration
.. versionadded:: 0.5
Previously, Sphinx accepted only UTF-8 encoded sources.
.. confval:: source_parsers
If given, a dictionary of parser classes for different source suffices. The
keys are the suffix, the values can be either a class or a string giving a
fully-qualified name of a parser class. Files with a suffix that is not in
the dictionary will be parsed with the default reStructuredText parser.
For example::
source_parsers = {'.md': 'some.markdown.module.Parser'}
.. versionadded:: 1.3
.. confval:: master_doc
The document name of the "master" document, that is, the document that