|
@@ -548,20 +548,21 @@ public class Translate extends MatchingTask { |
|
|
while (startIndex >= 0 |
|
|
while (startIndex >= 0 |
|
|
&& (startIndex + startToken.length()) <= line.length()) { |
|
|
&& (startIndex + startToken.length()) <= line.length()) { |
|
|
// the new value, this needs to be here |
|
|
// the new value, this needs to be here |
|
|
// because it is required to calculate the next position to search from |
|
|
|
|
|
// at the end of the loop |
|
|
|
|
|
|
|
|
// because it is required to calculate the next position to |
|
|
|
|
|
// search from at the end of the loop |
|
|
String replace = null; |
|
|
String replace = null; |
|
|
|
|
|
|
|
|
// we found a starttoken, is there an endtoken following? |
|
|
// we found a starttoken, is there an endtoken following? |
|
|
// start at token+tokenlength because start and end |
|
|
// start at token+tokenlength because start and end |
|
|
// token may be indentical |
|
|
// token may be indentical |
|
|
int endIndex = line.indexOf(endToken, startIndex + startToken.length()); |
|
|
|
|
|
|
|
|
int endIndex = line.indexOf( |
|
|
|
|
|
endToken, startIndex + startToken.length()); |
|
|
if (endIndex < 0) { |
|
|
if (endIndex < 0) { |
|
|
startIndex += 1; |
|
|
startIndex += 1; |
|
|
} else { |
|
|
} else { |
|
|
// grab the token |
|
|
// grab the token |
|
|
String token |
|
|
|
|
|
= line.substring(startIndex + startToken.length(), endIndex); |
|
|
|
|
|
|
|
|
String token = line.substring( |
|
|
|
|
|
startIndex + startToken.length(), endIndex); |
|
|
|
|
|
|
|
|
// If there is a white space or = or :, then |
|
|
// If there is a white space or = or :, then |
|
|
// it isn't to be treated as a valid key. |
|
|
// it isn't to be treated as a valid key. |
|
|