mirror of
https://github.com/certbot/certbot.git
synced 2026-06-11 01:30:14 -04:00
Check for comments more accurately
This commit is contained in:
parent
73fdc08d83
commit
df61b0e349
1 changed files with 1 additions and 1 deletions
|
|
@ -533,7 +533,7 @@ def _comment_directive(block, location):
|
|||
"""Add a comment to the end of the line at location."""
|
||||
next_entry = block[location + 1] if location + 1 < len(block) else None
|
||||
if isinstance(next_entry, list) and next_entry:
|
||||
if COMMENT in next_entry[-1]:
|
||||
if len(next_entry) >= 2 and next_entry[-2] == "#" and COMMENT in next_entry[-1]:
|
||||
return
|
||||
elif isinstance(next_entry, nginxparser.UnspacedList):
|
||||
next_entry = next_entry.spaced[0]
|
||||
|
|
|
|||
Loading…
Reference in a new issue