Skip to content

Commit c0656b9

Browse files
committed
Fix comment parsing
1 parent fda6e57 commit c0656b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nginx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ def loads(data, conf=True):
485485
index += m.end()
486486
continue
487487

488-
m = re.compile(r'^(\s*)#\s*(.*?)\n', re.S).search(data[index:])
488+
m = re.compile(r'^(\s*)#[ \r\t\f]*(.*?)\n', re.S).search(data[index:])
489489
if m:
490490
c = Comment(m.group(2), inline='\n' not in m.group(1))
491491
if lopen and isinstance(lopen[0], Container):

0 commit comments

Comments
 (0)