mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Allow line breaks before binary operators
This commit is contained in:
parent
6016b4d634
commit
f852661243
1
.flake8
1
.flake8
@ -5,6 +5,7 @@ ignore =
|
|||||||
E241,
|
E241,
|
||||||
E251,
|
E251,
|
||||||
E741,
|
E741,
|
||||||
|
W503,
|
||||||
W504,
|
W504,
|
||||||
I101,
|
I101,
|
||||||
B006,
|
B006,
|
||||||
|
@ -252,7 +252,7 @@ class TocTreeCollector(EnvironmentCollector):
|
|||||||
for domain in env.domains.values():
|
for domain in env.domains.values():
|
||||||
figtype = domain.get_enumerable_node_type(node)
|
figtype = domain.get_enumerable_node_type(node)
|
||||||
if (domain.name == 'std'
|
if (domain.name == 'std'
|
||||||
and not domain.get_numfig_title(node)): # type: ignore[attr-defined] # NoQA: E501,W503
|
and not domain.get_numfig_title(node)): # type: ignore[attr-defined] # NoQA: E501
|
||||||
# Skip if uncaptioned node
|
# Skip if uncaptioned node
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -1765,8 +1765,8 @@ class LaTeXTranslator(SphinxTranslator):
|
|||||||
hlcode = self.highlighter.highlight_block(
|
hlcode = self.highlighter.highlight_block(
|
||||||
node.astext(), lang, opts=opts, location=node, nowrap=True)
|
node.astext(), lang, opts=opts, location=node, nowrap=True)
|
||||||
self.body.append(r'\sphinxcode{\sphinxupquote{%' + CR
|
self.body.append(r'\sphinxcode{\sphinxupquote{%' + CR
|
||||||
+ hlcode.rstrip() + '%' + CR # NoQA: W503
|
+ hlcode.rstrip() + '%' + CR
|
||||||
+ '}}') # NoQA: W503
|
+ '}}')
|
||||||
raise nodes.SkipNode
|
raise nodes.SkipNode
|
||||||
|
|
||||||
def depart_literal(self, node: Element) -> None:
|
def depart_literal(self, node: Element) -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user