mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-10-16 23:49:19 +02:00
skip the optional-include regex when a scenery has no marker
This commit is contained in:
@@ -252,6 +252,10 @@ public class Scenery
|
||||
private string ParseAndStripOptionalIncludes(string content)
|
||||
{
|
||||
Includes.Clear();
|
||||
|
||||
if (content.IndexOf("$optional", StringComparison.OrdinalIgnoreCase) < 0)
|
||||
return content;
|
||||
|
||||
return Regex.Replace(
|
||||
content,
|
||||
@"include\s+(\S+(?:\s+\S+)*?)\s+end\s*//[^\r\n]*\$optional([^\r\n]*)\r?\n([\s\S]*?)endoptional\b",
|
||||
|
||||
Reference in New Issue
Block a user