Skip to content

Commit d536df5

Browse files
committed
fix: env regex was wrong
1 parent 01c2569 commit d536df5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Catglobe.CgScript.Common/BaseCgScriptMaker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public async Task<string> GetContent(string scriptName)
3232
/// </summary>
3333
protected abstract string GetPreamble(IScriptDefinition scriptDef);
3434

35-
[GeneratedRegex(@"#IF\s+(?<env>Development|Production|Staging)\b(?<script>.*?)\b#ENDIF", RegexOptions.Singleline | RegexOptions.IgnoreCase, -1)]
35+
[GeneratedRegex(@"#IF\s+(?<env>Development|Production|Staging)\s+(?<script>.*?)\s*#ENDIF", RegexOptions.Singleline | RegexOptions.IgnoreCase, -1)]
3636
private static partial Regex EnvironmentRegex();
3737
[GeneratedRegex("""new WorkflowScript\s*\(\s*"(?<scriptName>[^"]+)"\s*\)""", RegexOptions.Singleline, -1)]
3838
protected static partial Regex FindWorkflowReferences();

0 commit comments

Comments
 (0)