recommonmark/tests/sphinx_xref/conf.py
Gibson Fahnestock ec0ada952d
Remove URL quoting from refs before passing to Sphinx
Sphinx allows refs with spaces etc, and in fact autogenerates them with
the command [`autosectionlabel`][].

So if you put a:

```markdown
[Link 1](<some ref>)
[Link 2](<https://foo.com/bar baz>)
```

Then the links will be `some%20ref` and `https://foo.com/bar%20baz`.

We want to keep the URL quoting for external references, but if we're
passing it as `:any:` to Sphinx we need to unquote so Sphinx can find
the correct reference, the `<some ref>` should map to:

```rst
:ref:`some ref`
```

[`autosectionlabel`](https://www.sphinx-doc.org/en/master/usage/extensions/autosectionlabel.html)

Fixes: https://github.com/rtfd/recommonmark/issues/155
2019-05-23 16:01:37 +02:00

25 lines
598 B
Python

# -*- coding: utf-8 -*-
from recommonmark.parser import CommonMarkParser
extensions = 'sphinx.ext.autosectionlabel']
autosectionlabel_prefix_document = True
templates_path = ['_templates']
source_suffix = '.md'
source_parsers = { '.md': CommonMarkParser }
master_doc = 'index'
project = u'sphinxproj'
copyright = u'2015, rtfd'
author = u'rtfd'
version = '0.1'
release = '0.1'
highlight_language = 'python'
language = None
exclude_patterns = ['_build']
pygments_style = 'sphinx'
todo_include_todos = False
html_theme = 'alabaster'
html_static_path = ['_static']
htmlhelp_basename = 'sphinxproj'