Skip to content

Commit

Permalink
Merge pull request #87 from hguhlich/hg/fix-bug-in-indent-parser
Browse files Browse the repository at this point in the history
fix bug in new_indent_parser
  • Loading branch information
jamesvillarrubia authored Oct 3, 2024
2 parents c9cdce9 + 1e1d9f9 commit c725429
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nlm_ingestor/ingestor/visual_ingestor/new_indent_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def indent_leafs(self):
curr_header = block
if curr_header and block['block_type'] in ['para', 'table', 'list', 'table_row']:
block['level'] = curr_header['level'] + 1
if block['block_type'] in ['list_item']:
if curr_header and block['block_type'] in ['list_item']:
if prev_block and prev_block['block_type'] in ['para', 'list_item'] and \
prev_block['block_text'].endswith(':'):
block['level'] = curr_header['level'] + 1
Expand Down

0 comments on commit c725429

Please sign in to comment.