Skip to content

Commit

Permalink
Use simpler check to allow spaces in file names
Browse files Browse the repository at this point in the history
0x20 (space) should be allowed.  Explicitly check for the interval
containing only 0x20, instead of using the fact that i will be 0x21 at
the next loop iteration.

Suggested-by: Marek Marczykowski-Górecki <[email protected]>
  • Loading branch information
DemiMarie committed Jan 31, 2023
1 parent 13389b5 commit ddf04b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gentbl.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ def print_interval(interval, last_cat):
if cat == last_cat:
interval[1] = i
else:
if last_cat[0] in ('C', 'Z') and i != 0x21:
# Allow the interval consisting only of 0x20, to allow spaces in
# file names
if last_cat[0] in ('C', 'Z') and interval != [0x20, 0x20]:
print_interval(interval, last_cat)
interval = [i, i]
print_interval(interval, last_cat)
Expand Down

0 comments on commit ddf04b9

Please sign in to comment.