Browse Source

Regex updated to include spaces only in a line.

feature-config-parsing2
MagicBot 3 months ago
parent
commit
720b97dc69
  1. 2
      src/engine/wpak/EffectsParser.java
  2. 4
      src/engine/wpak/PowersParser.java

2
src/engine/wpak/EffectsParser.java

@ -55,7 +55,7 @@ public class EffectsParser { @@ -55,7 +55,7 @@ public class EffectsParser {
// Remove all lines that contain a # and leading/trailing blank lines
effectData = effectData.replaceAll("(?m)^.*#.*\r?\n?", "");
effectData = effectData.replaceAll("(?m)^[ \t]*\r?\n?", "");
effectData = effectData.trim();
// Parse effect entry header

4
src/engine/wpak/PowersParser.java

@ -72,9 +72,9 @@ public class PowersParser { @@ -72,9 +72,9 @@ public class PowersParser {
// Cleanup dangling tags and lines that contain a # and leading/trailing blank lines
powerString = new StringBuilder(powerString.toString().replaceAll("CONDITIONBEGINCONDITIONEND", ""));
powerString = new StringBuilder(powerString.toString().replaceAll("(?m)^.*#.*\r?\n?", ""));
powerString = new StringBuilder(powerString.toString().replaceAll("(?m)^[ \t]*\r?\n?", ""));
conditionString = new StringBuilder(conditionString.toString().replaceAll("(?m)^.*#.*\r?\n?", ""));
conditionString = new StringBuilder(conditionString.toString().replaceAll("(?m)^[ \t]*\r?\n?", ""));
// Parse header line in power data

Loading…
Cancel
Save