"=|" + // Need the = because we might have to find unescaped =
"<!--|" +
"''|" +
+ "<pre>|" +
+ "<math>|" +
+ "<ref>|" +
"$)", Pattern.MULTILINE);
private static final String listChars = "*#:;";
"\\[\\[|" +
"<!--|" +
"''|" +
+ "<pre>|" +
+ "<math>|" +
+ "<ref>|" +
"[\n]"
);
return this;
}
- if (justReturnedNewline) {
+ if (justReturnedNewline) {
justReturnedNewline = false;
final char firstChar = wikiText.charAt(end);
return this;
}
+ if (wikiText.startsWith("<ref>", start)) {
+ end = safeIndexOf(wikiText, start, "</ref>", "\n");
+ isHtml = true;
+ return this;
+ }
+
if (wikiText.startsWith("<math>", start)) {
end = safeIndexOf(wikiText, start, "</math>", "\n");
isHtml = true;
errors.add("Unmatched <!-- error: " + wikiText.substring(start));
return safeIndexOf(wikiText, start, "\n", "\n");
}
- } else if (matchText.equals("''")) {
+ } else if (matchText.equals("''") || (matchText.startsWith("<") && matchText.endsWith(">"))) {
// Don't care.
} else {
assert false : "Match text='" + matchText + "'";