Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:GA
python-base.33823
PygmentsBridge-trime_doctest_flags.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File PygmentsBridge-trime_doctest_flags.patch of Package python-base.33823
--- Doc/tools/extensions/pyspecific.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) --- a/Doc/tools/extensions/pyspecific.py +++ b/Doc/tools/extensions/pyspecific.py @@ -31,14 +31,17 @@ Body.enum.converters['loweralpha'] = \ # doctest docs themselves orig_visit_literal_block = HTMLTranslator.visit_literal_block def new_visit_literal_block(self, node): + old_trim_doctest_flags = None meta = self.builder.env.metadata[self.builder.current_docname] - old_trim_doctest_flags = self.highlighter.trim_doctest_flags - if 'keepdoctest' in meta: - self.highlighter.trim_doctest_flags = False + if hasattr(self.highlighter, 'trim_doctest_flags'): + old_trim_doctest_flags = self.highlighter.trim_doctest_flags + if 'keepdoctest' in meta: + self.highlighter.trim_doctest_flags = False try: orig_visit_literal_block(self, node) finally: - self.highlighter.trim_doctest_flags = old_trim_doctest_flags + if old_trim_doctest_flags is not None: + self.highlighter.trim_doctest_flags = old_trim_doctest_flags HTMLTranslator.visit_literal_block = new_visit_literal_block
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor