From dedb388e3544e2ce7a0735be1393e05f051a99ba Mon Sep 17 00:00:00 2001 From: bain Date: Mon, 4 Nov 2024 23:05:35 +0100 Subject: [PATCH] update include regex --- ncc/certs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ncc/certs.py b/ncc/certs.py index 7818880..0e3ab99 100644 --- a/ncc/certs.py +++ b/ncc/certs.py @@ -15,8 +15,8 @@ ssl_certificate_key $keypath; ssl_certificate $certpath; """.lstrip() SERVER_BLOCK_RE = re.compile(r"(?:^|[{};])\s*server\s*{", re.MULTILINE) -INCLUDE_RE = re.compile(r"(?:^|[{};])\s*include\s+([^;]+);", re.MULTILINE) -SERVER_NAME_RE = re.compile(r"(?:^|[{};])\s*server_name\s+([^;]+);", re.MULTILINE) +INCLUDE_RE = re.compile(r"(?:^|[{};])\s*include\s+([^;]+)(?=;)", re.MULTILINE) +SERVER_NAME_RE = re.compile(r"(?:^|[{};])\s*server_name\s+([^;]+)(?=;)", re.MULTILINE) class ConfigError(Exception):