Provide fallbacks for parser config settings.
commite3bd0958bac8e7be9e6799d3697edbafa238d2d3
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>
Wed, 7 Apr 2021 12:09:51 +0000 (7 12:09 +0000)
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>
Wed, 7 Apr 2021 12:09:51 +0000 (7 12:09 +0000)
treebc7bd630a823840386e784a5c73c79442fb9a111
parentf2adcb0a1684142475d7297bfe09433f320b158f
Provide fallbacks for parser config settings.

Some 3rd party applications fail with AttributeError due to
missing values in the document.settings object.

a) because they don't follow the requirement documented in
   utils.new_document:

     If you will use the document object with any Docutils components,
     you must provide their default settings as well.

b) because they may provide a hard-coded set missing new settings.

This should fix bug #415 and
https://github.com/readthedocs/recommonmark/issues/220.

See also the sphinx issue with Docutils 0.13.1
https://github.com/sphinx-doc/sphinx/issues/3951.

git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8671 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
docutils/HISTORY.txt
docutils/docutils/frontend.py
docutils/docutils/parsers/__init__.py
docutils/docutils/parsers/rst/__init__.py
docutils/docutils/transforms/frontmatter.py
docutils/docutils/transforms/parts.py
docutils/docutils/transforms/universal.py
docutils/docutils/utils/__init__.py