mirror of
git://repo.or.cz/docutils.git
synced 2025-10-06 00:32:41 +02:00
Small editorial changes.
Add type info, shorten function call, merge repetitive commands. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@10231 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
This commit is contained in:
@@ -229,7 +229,7 @@ class RSTState(StateWS):
|
||||
nested_sm = NestedStateMachine
|
||||
nested_sm_cache = []
|
||||
|
||||
def __init__(self, state_machine, debug=False) -> None:
|
||||
def __init__(self, state_machine: RSTStateMachine, debug=False) -> None:
|
||||
self.nested_sm_kwargs = {'state_classes': state_classes,
|
||||
'initial_state': 'Body'}
|
||||
StateWS.__init__(self, state_machine, debug)
|
||||
@@ -354,8 +354,8 @@ class RSTState(StateWS):
|
||||
|
||||
# run the state machine and populate `node`:
|
||||
block_length = len(block)
|
||||
my_state_machine.run(block, input_offset, memo=self.memo,
|
||||
node=node, match_titles=match_titles)
|
||||
my_state_machine.run(block, input_offset, self.memo,
|
||||
node, match_titles)
|
||||
|
||||
if match_titles:
|
||||
if node == self.state_machine.node:
|
||||
|
@@ -2761,8 +2761,7 @@ class LaTeXTranslator(writers.DoctreeTranslator):
|
||||
*self.ids_to_labels(node, set_anchor=False, newline=True),
|
||||
f'\\end{{{math_env}}}']
|
||||
if node['classes']:
|
||||
self.out.append('\n')
|
||||
self.out.append('}' * len(node['classes']))
|
||||
self.out.append('\n' + '}' * len(node['classes']))
|
||||
raise nodes.SkipNode # content already processed
|
||||
|
||||
def depart_math_block(self, node) -> None:
|
||||
|
Reference in New Issue
Block a user