Skip to content

Commit

Permalink
trailing double space handling in markdownowner.py
Browse files Browse the repository at this point in the history
  • Loading branch information
me-coder committed Oct 3, 2024
1 parent 4b2053c commit c9719c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/markdowner.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ def edit_codeblocks(content, filename):

def perform_edits(content, flags, filename):
if flags.trailing or flags.all:
replacements = {" \n": "\n", "\t\n": "\n"}
# Typically for markdown documents <space><space>\n adds new line without paragraph change.
# These need to be updated as " \n": "</br>\n"
replacements = {" \n": "</br>\n", "\t\n": "\n", " \n": "\n"}
content = replace_with_dict(content, replacements, filename)

if flags.ascii or flags.all:
Expand Down

0 comments on commit c9719c9

Please sign in to comment.