Skip to content

Commit

Permalink
refactor: simplify judge_extra_insertion conds.
Browse files Browse the repository at this point in the history
  • Loading branch information
stakiran committed Apr 27, 2021
1 parent 2b84510 commit 066b83b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib_scblines2markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,19 +265,14 @@ def continuous_indent(cur_indentdepth, inblockstate_user):
return extra_insertion

# list or block が始まった
if c==1 and p==0:
if c>=1 and p==0:
extra_insertion = start_of_list_or_block(inblockstate_user)
return extra_insertion

# list or block が続いている(インデントは変わらず)
if c==1 and p==1:
return IGNORE

# list or blockが終わった
if p==0:
extra_insertion = end_of_list_or_block(inblockstate_user)
return extra_insertion

# list or block が続いている(インデントは変わらず or 深くなった)
# 先頭行のときもここに入る.
is_more_deepen = c>=p
Expand Down

0 comments on commit 066b83b

Please sign in to comment.