Skip to content

Commit

Permalink
compatibility markdown-conventions and fix-imports
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrik-bakke committed May 27, 2023
1 parent 8c7f782 commit 437056c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/markdown_conventions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
close_tag_pattern = re.compile(r'\n```$', flags=re.MULTILINE)

empty_block_pattern = re.compile(
r'^```\S+.*\n(\s*\n)*\n```\s*$', flags=re.MULTILINE)
r'^```\S+.*\n(\s*\n)*\n```\s*$(?!\n(\s*\n)*</details>)', flags=re.MULTILINE)


def has_well_formed_blocks(mdcode, pos=0):
Expand Down Expand Up @@ -87,7 +87,7 @@ def has_well_formed_blocks(mdcode, pos=0):

status |= STATUS_EMPTY_SECTION_NONINCREASING_LEVEL

output = empty_block_pattern.sub('\n', output)
output = empty_block_pattern.sub('', output)

if output != inputText:
with open(fpath, 'w') as f:
Expand Down

0 comments on commit 437056c

Please sign in to comment.