mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 16:19:11 +02:00
Add newlines to the ends of blocks more correctly
This commit is contained in:
@@ -518,8 +518,8 @@ def _add_directives(block, directives, replace):
|
||||
for directive in directives:
|
||||
_add_directive(block, directive, replace)
|
||||
last = block[-1]
|
||||
if not (isinstance(last, str) and '\n' in last):
|
||||
block.append('\n')
|
||||
if not '\n' in last: # could be " \n " or ["\n"] !
|
||||
block.append(nginxparser.UnspacedList('\n'))
|
||||
|
||||
|
||||
REPEATABLE_DIRECTIVES = set(['server_name', 'listen', 'include'])
|
||||
|
||||
Reference in New Issue
Block a user