From 411f82d9b9c268bf4e11dab7fe01d8ad0df88024 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 2 Oct 2011 19:39:42 +0200 Subject: [PATCH 1/2] Fix markup test with latest pygments-related updates. --- tests/test_markup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_markup.py b/tests/test_markup.py index 5d56bea30..4c8e7264f 100644 --- a/tests/test_markup.py +++ b/tests/test_markup.py @@ -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 `_', None, From 262d8a0e5f33c2a0662c36c089e0543a837c1381 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 2 Oct 2011 19:54:35 +0200 Subject: [PATCH 2/2] Re-add monkey patch whose removal made latex build fail. --- sphinx/util/nodes.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py index 49f3a2125..c2b7edf4d 100644 --- a/sphinx/util/nodes.py +++ b/sphinx/util/nodes.py @@ -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