1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

Mw_parse: Add support for gobbling single-line comments

This commit is contained in:
gnosygnu
2017-01-11 08:35:16 -05:00
parent 25f74d7d80
commit 75972fcff0
3 changed files with 22 additions and 21 deletions

View File

@@ -159,14 +159,14 @@ public class Bry_find_ {
return Bry_find_.Not_found;
}
public static int Find_bwd__while_space_or_tab(byte[] src, int cur, int end) { // get pos of 1st char that is not \t or \s
if (cur >= src.length) return Bry_find_.Not_found;
for (int i = cur; i >= end; i--) {
if (cur < 0 || cur >= src.length) return Bry_find_.Not_found;
for (int i = cur - 1; i >= end; i--) {
byte b = src[i];
switch (b) {
case Byte_ascii.Space: case Byte_ascii.Tab:
break;
default:
return i;
return i + 1;
}
}
return Bry_find_.Not_found;