mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch 'stable'
Conflicts resolved:
sphinx/domains/cpp.py
sphinx/domains/python.py
sphinx/texinputs/sphinx.sty
sphinx/util/docfields.py
sphinx/writers/latex.py
tests/test_build_latex.py
Also updated:
sphinx/domains/__init__.py
This commit is contained in:
@@ -564,21 +564,21 @@ def test_latex_show_urls_is_inline(app, status, warning):
|
||||
'First\n%\n\\end{footnote}') in result
|
||||
assert ('Second footnote: %\n\\begin{footnote}[1]\\sphinxAtStartFootnote\n'
|
||||
'Second\n%\n\\end{footnote}') in result
|
||||
assert '\\href{http://sphinx-doc.org/}{Sphinx} (http://sphinx-doc.org/)' in result
|
||||
assert '\\sphinxhref{http://sphinx-doc.org/}{Sphinx} (http://sphinx-doc.org/)' in result
|
||||
assert ('Third footnote: %\n\\begin{footnote}[3]\\sphinxAtStartFootnote\n'
|
||||
'Third\n%\n\\end{footnote}') in result
|
||||
assert ('\\href{http://sphinx-doc.org/~test/}{URL including tilde} '
|
||||
assert ('\\sphinxhref{http://sphinx-doc.org/~test/}{URL including tilde} '
|
||||
'(http://sphinx-doc.org/\\textasciitilde{}test/)') in result
|
||||
assert ('\\item[{\\href{http://sphinx-doc.org/}{URL in term} '
|
||||
assert ('\\item[{\\sphinxhref{http://sphinx-doc.org/}{URL in term} '
|
||||
'(http://sphinx-doc.org/)}] \\leavevmode\nDescription' in result)
|
||||
assert ('\\item[{Footnote in term \\sphinxfootnotemark[5]}] '
|
||||
'\\leavevmode%\n\\begin{footnotetext}[5]\\sphinxAtStartFootnote\n'
|
||||
'Footnote in term\n%\n\\end{footnotetext}\\ignorespaces \n'
|
||||
'Description') in result
|
||||
assert ('\\item[{\\href{http://sphinx-doc.org/}{Term in deflist} '
|
||||
assert ('\\item[{\\sphinxhref{http://sphinx-doc.org/}{Term in deflist} '
|
||||
'(http://sphinx-doc.org/)}] \\leavevmode\nDescription') in result
|
||||
assert '\\url{https://github.com/sphinx-doc/sphinx}\n' in result
|
||||
assert ('\\href{mailto:sphinx-dev@googlegroups.com}'
|
||||
assert '\\sphinxurl{https://github.com/sphinx-doc/sphinx}\n' in result
|
||||
assert ('\\sphinxhref{mailto:sphinx-dev@googlegroups.com}'
|
||||
'{sphinx-dev@googlegroups.com}') in result
|
||||
|
||||
|
||||
@@ -608,30 +608,30 @@ def test_latex_show_urls_is_footnote(app, status, warning):
|
||||
'First\n%\n\\end{footnote}') in result
|
||||
assert ('Second footnote: %\n\\begin{footnote}[1]\\sphinxAtStartFootnote\n'
|
||||
'Second\n%\n\\end{footnote}') in result
|
||||
assert ('\\href{http://sphinx-doc.org/}{Sphinx}'
|
||||
assert ('\\sphinxhref{http://sphinx-doc.org/}{Sphinx}'
|
||||
'%\n\\begin{footnote}[4]\\sphinxAtStartFootnote\n'
|
||||
'\\nolinkurl{http://sphinx-doc.org/}\n%\n\\end{footnote}') in result
|
||||
'\\sphinxnolinkurl{http://sphinx-doc.org/}\n%\n\\end{footnote}') in result
|
||||
assert ('Third footnote: %\n\\begin{footnote}[6]\\sphinxAtStartFootnote\n'
|
||||
'Third\n%\n\\end{footnote}') in result
|
||||
assert ('\\href{http://sphinx-doc.org/~test/}{URL including tilde}'
|
||||
assert ('\\sphinxhref{http://sphinx-doc.org/~test/}{URL including tilde}'
|
||||
'%\n\\begin{footnote}[5]\\sphinxAtStartFootnote\n'
|
||||
'\\nolinkurl{http://sphinx-doc.org/~test/}\n%\n\\end{footnote}') in result
|
||||
assert ('\\item[{\\href{http://sphinx-doc.org/}'
|
||||
'\\sphinxnolinkurl{http://sphinx-doc.org/~test/}\n%\n\\end{footnote}') in result
|
||||
assert ('\\item[{\\sphinxhref{http://sphinx-doc.org/}'
|
||||
'{URL in term}\\sphinxfootnotemark[8]}] '
|
||||
'\\leavevmode%\n\\begin{footnotetext}[8]\\sphinxAtStartFootnote\n'
|
||||
'\\nolinkurl{http://sphinx-doc.org/}\n%\n'
|
||||
'\\sphinxnolinkurl{http://sphinx-doc.org/}\n%\n'
|
||||
'\\end{footnotetext}\\ignorespaces \nDescription') in result
|
||||
assert ('\\item[{Footnote in term \\sphinxfootnotemark[10]}] '
|
||||
'\\leavevmode%\n\\begin{footnotetext}[10]\\sphinxAtStartFootnote\n'
|
||||
'Footnote in term\n%\n\\end{footnotetext}\\ignorespaces \n'
|
||||
'Description') in result
|
||||
assert ('\\item[{\\href{http://sphinx-doc.org/}{Term in deflist}'
|
||||
assert ('\\item[{\\sphinxhref{http://sphinx-doc.org/}{Term in deflist}'
|
||||
'\\sphinxfootnotemark[9]}] '
|
||||
'\\leavevmode%\n\\begin{footnotetext}[9]\\sphinxAtStartFootnote\n'
|
||||
'\\nolinkurl{http://sphinx-doc.org/}\n%\n'
|
||||
'\\sphinxnolinkurl{http://sphinx-doc.org/}\n%\n'
|
||||
'\\end{footnotetext}\\ignorespaces \nDescription') in result
|
||||
assert ('\\url{https://github.com/sphinx-doc/sphinx}\n' in result)
|
||||
assert ('\\href{mailto:sphinx-dev@googlegroups.com}'
|
||||
assert ('\\sphinxurl{https://github.com/sphinx-doc/sphinx}\n' in result)
|
||||
assert ('\\sphinxhref{mailto:sphinx-dev@googlegroups.com}'
|
||||
'{sphinx-dev@googlegroups.com}\n') in result
|
||||
|
||||
|
||||
@@ -661,20 +661,20 @@ def test_latex_show_urls_is_no(app, status, warning):
|
||||
'First\n%\n\\end{footnote}') in result
|
||||
assert ('Second footnote: %\n\\begin{footnote}[1]\\sphinxAtStartFootnote\n'
|
||||
'Second\n%\n\\end{footnote}') in result
|
||||
assert '\\href{http://sphinx-doc.org/}{Sphinx}' in result
|
||||
assert '\\sphinxhref{http://sphinx-doc.org/}{Sphinx}' in result
|
||||
assert ('Third footnote: %\n\\begin{footnote}[3]\\sphinxAtStartFootnote\n'
|
||||
'Third\n%\n\\end{footnote}') in result
|
||||
assert '\\href{http://sphinx-doc.org/~test/}{URL including tilde}' in result
|
||||
assert ('\\item[{\\href{http://sphinx-doc.org/}{URL in term}}] '
|
||||
assert '\\sphinxhref{http://sphinx-doc.org/~test/}{URL including tilde}' in result
|
||||
assert ('\\item[{\\sphinxhref{http://sphinx-doc.org/}{URL in term}}] '
|
||||
'\\leavevmode\nDescription') in result
|
||||
assert ('\\item[{Footnote in term \\sphinxfootnotemark[5]}] '
|
||||
'\\leavevmode%\n\\begin{footnotetext}[5]\\sphinxAtStartFootnote\n'
|
||||
'Footnote in term\n%\n\\end{footnotetext}\\ignorespaces \n'
|
||||
'Description') in result
|
||||
assert ('\\item[{\\href{http://sphinx-doc.org/}{Term in deflist}}] '
|
||||
assert ('\\item[{\\sphinxhref{http://sphinx-doc.org/}{Term in deflist}}] '
|
||||
'\\leavevmode\nDescription') in result
|
||||
assert ('\\url{https://github.com/sphinx-doc/sphinx}\n' in result)
|
||||
assert ('\\href{mailto:sphinx-dev@googlegroups.com}'
|
||||
assert ('\\sphinxurl{https://github.com/sphinx-doc/sphinx}\n' in result)
|
||||
assert ('\\sphinxhref{mailto:sphinx-dev@googlegroups.com}'
|
||||
'{sphinx-dev@googlegroups.com}\n') in result
|
||||
|
||||
|
||||
|
||||
@@ -408,12 +408,6 @@ def test_templates():
|
||||
check('class', "template<int T = 42> A", None, "I_iE1A")
|
||||
check('class', "template<int = 42> A", None, "I_iE1A")
|
||||
|
||||
# from breathe#218
|
||||
check('function',
|
||||
"template<typename F> "
|
||||
"void allow(F *f, typename func<F, B, G!=1>::type tt)",
|
||||
None, "I0E5allowP1FN4funcI1F1BXG!=1EE4typeE")
|
||||
|
||||
# from #2058
|
||||
check('function',
|
||||
"template<typename Char, typename Traits> "
|
||||
@@ -457,6 +451,16 @@ def test_templates():
|
||||
check('concept', 'template<typename ...Pack> Numerics = (... && Numeric<Pack>)',
|
||||
None, 'IDpE8Numerics')
|
||||
|
||||
def test_template_args():
|
||||
# from breathe#218
|
||||
check('function',
|
||||
"template<typename F> "
|
||||
"void allow(F *f, typename func<F, B, G!=1>::type tt)",
|
||||
None, "I0E5allowP1FN4funcI1F1BXG!=1EE4typeE")
|
||||
# from #3542
|
||||
check('type', "template<typename T> "
|
||||
"enable_if_not_array_t = std::enable_if_t<!is_array<T>::value, int>",
|
||||
None, "I0E21enable_if_not_array_t")
|
||||
|
||||
def test_attributes():
|
||||
# style: C++
|
||||
|
||||
@@ -217,7 +217,7 @@ def get_verifier(verify, verify_re):
|
||||
'verify_re',
|
||||
u'`test <http://example.com/~me/>`_',
|
||||
None,
|
||||
r'\\href{http://example.com/~me/}{test}.*',
|
||||
r'\\sphinxhref{http://example.com/~me/}{test}.*',
|
||||
),
|
||||
])
|
||||
def test_inline(get_verifier, type, rst, html_expected, latex_expected):
|
||||
|
||||
Reference in New Issue
Block a user