mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 16:19:13 +02:00
Preserve spaces before comments at the beginning of a file
This commit is contained in:
@@ -73,16 +73,11 @@ class RawNginxParser(object):
|
||||
block << Group(block_begin + left_bracket + block_innards + right_bracket)
|
||||
|
||||
script = OneOrMore(Group(comment | assignment) ^ block ^ map_block) + space + stringEnd
|
||||
script.parseWithTabs()
|
||||
testLine = OneOrMore(Group(space + key + location_statement)).leaveWhitespace()
|
||||
testTwo = OneOrMore(block)
|
||||
script.parseWithTabs().leaveWhitespace()
|
||||
|
||||
def __init__(self, source):
|
||||
self.source = source
|
||||
|
||||
def test(self):
|
||||
return self.testLine.parseString(self.source)
|
||||
|
||||
def parse(self):
|
||||
"""Returns the parsed tree."""
|
||||
return self.script.parseString(self.source)
|
||||
|
||||
Reference in New Issue
Block a user