Skip to content

Commit

Permalink
Fix a bug for value using dot or dash in their name
Browse files Browse the repository at this point in the history
  • Loading branch information
sarbian committed Dec 21, 2014
1 parent 7b14065 commit c508e06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions moduleManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ public IEnumerator ApplyPatch(List<String> excludePaths, string Stage)
}

// Name is group 1, index is group 2, operator is group 3
private static Regex parseValue = new Regex(@"([\w\?\*]*)(?:,(-?[0-9]+))?(?:\s([+\-*/^!]))?");
private static Regex parseValue = new Regex(@"([\w\-\.\?\*]*)(?:,(-?[0-9]+))?(?:\s([+\-*/^!]))?");

// ModifyNode applies the ConfigNode mod as a 'patch' to ConfigNode original, then returns the patched ConfigNode.
// it uses FindConfigNodeIn(src, nodeType, nodeName, nodeTag) to recurse.
Expand Down Expand Up @@ -1450,7 +1450,7 @@ public ConfigNode ModifyNode(ConfigNode original, ConfigNode mod)
}

// KeyName is group 1, index is group 2, value indexis group 3, value separator is group 4
private static readonly Regex parseVarKey = new Regex(@"(\w+)(?:,((?:[0-9]+)+))?(?:\[((?:[0-9]+)+)(?:,(.))?\])?");
private static readonly Regex parseVarKey = new Regex(@"(\w\-\.+)(?:,((?:[0-9]+)+))?(?:\[((?:[0-9]+)+)(?:,(.))?\])?");

// Search for a value by a path alike string
private static string RecurseVariableSearch(string path, ConfigNode currentNode)
Expand Down

0 comments on commit c508e06

Please sign in to comment.