Skip to content

Commit 70ca7cf

Browse files
author
jantje
committed
#1476 replace |) with |) for size regex
1 parent dc7d21f commit 70ca7cf

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

io.sloeber.core/src/io/sloeber/core/txt/WorkAround.java

+8-4
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
public class WorkAround extends Const {
4646
// Each time this class is touched consider changing the String below to enforce
4747
// updates
48-
private static final String FIRST_SLOEBER_WORKAROUND_LINE = "#Sloeber created workaound file V1.04.test 03 ";
48+
private static final String FIRST_SLOEBER_WORKAROUND_LINE = "#Sloeber created workaound file V1.04.test 04 ";
4949

5050
/**
5151
* workarounds done at installation time. I try to keep those at a minimum but
@@ -370,9 +370,13 @@ private static String platformApplyStandardWorkArounds(String inPlatformTxt) {
370370
while (regex_macher.find()) {
371371
String origLine = platformTXT.substring(regex_macher.start(), regex_macher.end());
372372
String workedAroundLine = origLine.replace("(?:", "(");
373-
String badSuffix = "\\s+([0-9]+).*";
374-
if (workedAroundLine.endsWith(badSuffix)) {
375-
workedAroundLine = workedAroundLine.substring(0, workedAroundLine.length() - badSuffix.length());
373+
String badSuffix1 = "\\s+([0-9]+).*";
374+
String badSuffix2 = "|)";
375+
if (workedAroundLine.endsWith(badSuffix1)) {
376+
workedAroundLine = workedAroundLine.substring(0, workedAroundLine.length() - badSuffix1.length());
377+
}
378+
if (workedAroundLine.endsWith(badSuffix2)) {
379+
workedAroundLine = workedAroundLine.substring(0, workedAroundLine.length() - 2) + ")";
376380
}
377381
if (!origLine.equals(workedAroundLine)) {
378382
replaceInfo.put(origLine, workedAroundLine);

0 commit comments

Comments
 (0)