Skip to content

Commit 85cb12c

Browse files
committed
fix bug in compress pattern hwen there is "}" in comment
1 parent 170280e commit 85cb12c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

PAE.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
multiprocessing.freeze_support()
2222

23-
version = 'V1.13.7'
23+
version = 'V1.13.8'
2424

2525
class DemoClass(tk.Tk):
2626

src/pattern_processor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def add_repeat(something: str, timemode: str) -> str:
119119
new_atp_file.write('{0}'.format(prev_line[-1]))
120120
repeat_cnt = 1
121121

122-
if (line[-1].find(r'}') != -1) or line[-1] == '':
122+
line_no_comment, sep, tail = line[-1].partition(r'//')
123+
if (line_no_comment.find(r'}') != -1) or line[-1] == '':
123124
body_flag = False
124125
for i in range(len(line)):
125126
new_atp_file.write('{0}'.format(line[i]))

0 commit comments

Comments
 (0)