Skip to content

Commit

Permalink
Fix blank lines being lost during rewrap
Browse files Browse the repository at this point in the history
The blank lines had invisible characters to mark the page
break locations - check for blank line didn't take this
into account.

Fixes #600
  • Loading branch information
windymilla committed Dec 26, 2024
1 parent 268a821 commit c4eacbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/guiguts/maintext.py
Original file line number Diff line number Diff line change
Expand Up @@ -2293,7 +2293,7 @@ def rewrap_section(

bq_depth_change = 0
# Split for non-blank/blank lines
if re.search(r"\S", line):
if re.search(rf"[^\s{PAGEMARK_PIN}]", line):
paragraph_complete = False
# Check for various block markup types
trimmed = line.lower().rstrip(" \n").replace(PAGEMARK_PIN, "")
Expand Down

0 comments on commit c4eacbd

Please sign in to comment.