mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
sip_to_pjsip: Make multiline comment parsing consistent with Asterisk
In Asterisk configuration, a multiline comment starts with ;-- as long as it is not followed by another dash (i.e. ;--- is not a multiline comment). ASTERISK-28323 #close Change-Id: I32dc38e0fac01d3c0805d27d35d2365a7c37ca72
This commit is contained in:
@@ -180,7 +180,7 @@ def remove_comment(line, is_comment):
|
|||||||
return "", True
|
return "", True
|
||||||
|
|
||||||
part = line.partition(COMMENT_START)
|
part = line.partition(COMMENT_START)
|
||||||
if part[1]:
|
if part[1] and not part[2].startswith('-'):
|
||||||
# found multi-line comment start check string before
|
# found multi-line comment start check string before
|
||||||
# it to make sure there wasn't an eol comment in it
|
# it to make sure there wasn't an eol comment in it
|
||||||
has_comment = part[0].partition(COMMENT)
|
has_comment = part[0].partition(COMMENT)
|
||||||
|
Reference in New Issue
Block a user