mirror of
https://github.com/vale981/recommonmark
synced 2025-03-05 18:11:39 -05:00
fix lint errors
This commit is contained in:
parent
4da4fd50e4
commit
149b6e3a4d
1 changed files with 6 additions and 5 deletions
|
@ -151,9 +151,10 @@ class CommonMarkParser(parsers.Parser):
|
||||||
def list_block(self, block):
|
def list_block(self, block):
|
||||||
list_node = None
|
list_node = None
|
||||||
if (block.list_data['type'] == "Bullet"):
|
if (block.list_data['type'] == "Bullet"):
|
||||||
list_node = nodes.bullet_list()
|
list_node_cls = nodes.bullet_list
|
||||||
else:
|
else:
|
||||||
list_node = nodes.enumerated_list()
|
list_node_cls = nodes.enumerated_list
|
||||||
|
list_node = list_node_cls()
|
||||||
list_node.line = block.start_line
|
list_node.line = block.start_line
|
||||||
|
|
||||||
self.current_node.append(list_node)
|
self.current_node.append(list_node)
|
||||||
|
@ -262,7 +263,7 @@ def parse_inline(parent_node, inline):
|
||||||
elif (inline.t == "Softbreak"):
|
elif (inline.t == "Softbreak"):
|
||||||
node = nodes.Text('\n')
|
node = nodes.Text('\n')
|
||||||
elif inline.t == "Emph":
|
elif inline.t == "Emph":
|
||||||
node = emph(inline.c)
|
node = emph(inline.c) # noqa
|
||||||
elif inline.t == "Strong":
|
elif inline.t == "Strong":
|
||||||
node = strong(inline.c)
|
node = strong(inline.c)
|
||||||
elif inline.t == "Link":
|
elif inline.t == "Link":
|
||||||
|
@ -283,5 +284,5 @@ def parse_inline(parent_node, inline):
|
||||||
|
|
||||||
|
|
||||||
def append_inlines(parent_node, inlines):
|
def append_inlines(parent_node, inlines):
|
||||||
for i in range(len(inlines)):
|
for line in inlines:
|
||||||
parse_inline(parent_node, inlines[i])
|
parse_inline(parent_node, line)
|
||||||
|
|
Loading…
Add table
Reference in a new issue