From 2d83b1c0595668fd18f665a6406e948fda04118a Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 11 Mar 2021 15:25:04 +1100 Subject: Only substitute one instance of RE for ReplaceREInFile. --- scripts/FileGenerator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/FileGenerator.py') diff --git a/scripts/FileGenerator.py b/scripts/FileGenerator.py index cf949901c..9fb32f46a 100644 --- a/scripts/FileGenerator.py +++ b/scripts/FileGenerator.py @@ -217,5 +217,5 @@ def FindSectionInList(lines, markers): def ReplaceREInFile(path, match, replace): with codecs.open(path, "r", "utf-8") as f: contents = f.read() - contents = re.sub(match, replace, contents) + contents = re.sub(match, replace, contents, 1) UpdateFile(path, contents) -- cgit v1.2.3