mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
merge
This commit is contained in:
@@ -193,3 +193,10 @@ def _new_contains(self, key):
|
||||
return key in self.children
|
||||
|
||||
nodes.Node.__contains__ = _new_contains
|
||||
|
||||
# monkey-patch Element.copy to copy the rawsource
|
||||
|
||||
def _new_copy(self):
|
||||
return self.__class__(self.rawsource, **self.attributes)
|
||||
|
||||
nodes.Element.copy = _new_copy
|
||||
|
||||
@@ -127,9 +127,9 @@ def test_latex_escaping():
|
||||
yield (verify, u'Γ\\\\∞$', None,
|
||||
ur'\(\Gamma\)\textbackslash{}\(\infty\)\$')
|
||||
# in verbatim code fragments
|
||||
yield (verify, u'::\n\n @Γ\\∞$[]', None,
|
||||
u'\\begin{Verbatim}[commandchars=@\\[\\]]\n'
|
||||
u'@PYGZat[]@(@Gamma@)\\@(@infty@)@$@PYGZlb[]@PYGZrb[]\n'
|
||||
yield (verify, u'::\n\n @Γ\\∞${}', None,
|
||||
u'\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n'
|
||||
u'@\\(\\Gamma\\)\\PYGZbs{}\\(\\infty\\)\\$\\PYGZob{}\\PYGZcb{}\n'
|
||||
u'\\end{Verbatim}')
|
||||
# in URIs
|
||||
yield (verify_re, u'`test <http://example.com/~me/>`_', None,
|
||||
|
||||
Reference in New Issue
Block a user