From 8c526ccc7768dffcc7a2090346ac8dc2f4931af8 Mon Sep 17 00:00:00 2001 From: Brent Wilkins Date: Tue, 19 Sep 2023 12:40:52 -0600 Subject: [PATCH] Allow variable definition and export to be on different lines --- environ/environ.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environ/environ.py b/environ/environ.py index f74884be..f2196a83 100644 --- a/environ/environ.py +++ b/environ/environ.py @@ -925,7 +925,7 @@ def _keep_escaped_format_characters(match): return escaped_char for line in content.splitlines(): - m1 = re.match(r'\A(?:export )?([A-Za-z_0-9]+)=(.*)\Z', line) + m1 = re.match(r'\A(?:export )?([A-Za-z_0-9]+)(?:=)?(.*)\Z', line) if m1: key, val = m1.group(1), m1.group(2) # Look for value in quotes, ignore post-# comments