diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-03-28 18:54:10 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-03-28 18:54:10 +0900 |
commit | 8da576cce029dd0b8ecde60b2549e8dcbc71d88b (patch) | |
tree | 0fd43d70997f7c3d94638418e86bf0c5375b6ae8 /tests/test_domain_std.py | |
parent | 6a90c166008a46de95120ecc974fb16225f7a144 (diff) | |
download | sphinx-git-8da576cce029dd0b8ecde60b2549e8dcbc71d88b.tar.gz |
Fix #6477: Escape first "!" in a cross reference linking no longer possible
Diffstat (limited to 'tests/test_domain_std.py')
-rw-r--r-- | tests/test_domain_std.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/test_domain_std.py b/tests/test_domain_std.py index 1f0024efc..6f213e565 100644 --- a/tests/test_domain_std.py +++ b/tests/test_domain_std.py @@ -19,7 +19,8 @@ from html5lib import HTMLParser from sphinx import addnodes from sphinx.addnodes import ( - desc, desc_addname, desc_content, desc_name, desc_signature, glossary, index + desc, desc_addname, desc_content, desc_name, desc_signature, glossary, index, + pending_xref ) from sphinx.domains.std import StandardDomain from sphinx.testing import restructuredtext @@ -373,3 +374,12 @@ def test_productionlist(app, status, warning): text = (app.outdir / 'LineContinuation.html').read_text() assert "A</strong> ::= B C D E F G" in text + + +def test_disabled_docref(app): + text = (":doc:`index`\n" + ":doc:`!index`\n") + doctree = restructuredtext.parse(app, text) + assert_node(doctree, ([nodes.paragraph, ([pending_xref, nodes.inline, "index"], + "\n", + [nodes.inline, "index"])],)) |