mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix line numbers were not shown on warnings in LaTeX and texinfo builder
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -4,6 +4,7 @@ Release 1.3.5 (in development)
|
||||
Bugs fixed
|
||||
----------
|
||||
|
||||
* Fix line numbers was not shown on warnings in LaTeX and texinfo builders
|
||||
|
||||
Release 1.3.4 (released Jan 12, 2016)
|
||||
=====================================
|
||||
|
||||
@@ -292,9 +292,13 @@ def set_role_source_info(inliner, lineno, node):
|
||||
node.source, node.line = inliner.reporter.get_source_and_line(lineno)
|
||||
|
||||
|
||||
# monkey-patch Element.copy to copy the rawsource
|
||||
# monkey-patch Element.copy to copy the rawsource and line
|
||||
|
||||
def _new_copy(self):
|
||||
return self.__class__(self.rawsource, **self.attributes)
|
||||
newnode = self.__class__(self.rawsource, **self.attributes)
|
||||
if isinstance(self, nodes.Element):
|
||||
newnode.source = self.source
|
||||
newnode.line = self.line
|
||||
return newnode
|
||||
|
||||
nodes.Element.copy = _new_copy
|
||||
|
||||
@@ -24,9 +24,9 @@ from test_build_html import ENV_WARNINGS
|
||||
|
||||
|
||||
LATEX_WARNINGS = ENV_WARNINGS + """\
|
||||
None:None: WARNING: unknown option: &option
|
||||
None:None: WARNING: citation not found: missing
|
||||
None:None: WARNING: no matching candidate for image URI u'foo.\\*'
|
||||
%(root)s/markup.txt:158: WARNING: unknown option: &option
|
||||
None:60: WARNING: citation not found: missing
|
||||
%(root)s/images.txt:20: WARNING: no matching candidate for image URI u'foo.\\*'
|
||||
WARNING: invalid pair index entry u''
|
||||
WARNING: invalid pair index entry u'keyword; '
|
||||
"""
|
||||
|
||||
@@ -23,10 +23,10 @@ from test_build_html import ENV_WARNINGS
|
||||
|
||||
|
||||
TEXINFO_WARNINGS = ENV_WARNINGS + """\
|
||||
None:None: WARNING: unknown option: &option
|
||||
None:None: WARNING: citation not found: missing
|
||||
None:None: WARNING: no matching candidate for image URI u'foo.\\*'
|
||||
None:None: WARNING: no matching candidate for image URI u'svgimg.\\*'
|
||||
%(root)s/markup.txt:158: WARNING: unknown option: &option
|
||||
None:60: WARNING: citation not found: missing
|
||||
%(root)s/images.txt:20: WARNING: no matching candidate for image URI u'foo.\\*'
|
||||
%(root)s/images.txt:29: WARNING: no matching candidate for image URI u'svgimg.\\*'
|
||||
"""
|
||||
|
||||
if PY3:
|
||||
|
||||
Reference in New Issue
Block a user