Skip to content

Commit

Permalink
* Undo this for now
Browse files Browse the repository at this point in the history
  • Loading branch information
ArachisH committed May 6, 2020
1 parent 703264c commit 874768b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Sulakore/Habbo/Web/HGameData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class HGameData
{
private readonly Dictionary<string, string> _variables;

private const string FLASH_VAR_PATTERN = "('|\")(?<var>.*?)\\1(?>\\s+)?:(?>\\s+)?('|\")(?<value>.*?)\\3";
private const string FLASH_VAR_PATTERN = "(\"|')+?(?<var>.*?)(\"|')+?(:| :| : |: |,|, )+?(\"|')+?(?<value>.*?)(\"|')+(\\)|,|\\s|$)+";

private string _source;
public string Source
Expand Down Expand Up @@ -55,7 +55,14 @@ public bool ContainsVariable(string variable)
private void ExtractVariables()
{
_variables.Clear();
MatchCollection matches = Regex.Matches(Source, FLASH_VAR_PATTERN, RegexOptions.Multiline | RegexOptions.Compiled);

MatchCollection matches = Regex.Matches(Source, FLASH_VAR_PATTERN,
RegexOptions.Multiline
#if !DEBUG
| RegexOptions.Compiled
#endif
);

foreach (Match match in matches)
{
string variable = match.Groups["var"].Value;
Expand Down

0 comments on commit 874768b

Please sign in to comment.