mirror of
https://github.com/certbot/certbot.git
synced 2026-06-04 14:26:10 -04:00
Preserve spaces before comments at the beginning of a file
This commit is contained in:
parent
b7cf928852
commit
7183896ed7
2 changed files with 1 additions and 7 deletions
|
|
@ -2,7 +2,6 @@
|
|||
# This map is not a full windows-1251 <> utf8 map: it does not
|
||||
# contain Serbian and Macedonian letters. If you need a full map,
|
||||
# use contrib/unicode2nginx/win-utf map instead.
|
||||
#
|
||||
|
||||
charset_map windows-1251 utf-8 {
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue