<error="sdfgsg":>
This commit is contained in:
@@ -154,11 +154,11 @@ public class JetMacro extends BaseMacro {
|
|||||||
static {
|
static {
|
||||||
for (TagType type : knownExtraTagTypes) {
|
for (TagType type : knownExtraTagTypes) {
|
||||||
String tagName = type.tagName;
|
String tagName = type.tagName;
|
||||||
openTags.put(type, Pattern.compile("<" + tagName + "\\s*(desc=\\\"([^\n\"]*?)\\\")?>", Pattern.MULTILINE));
|
openTags.put(type, Pattern.compile("<" + tagName + "\\s*((desc)?=\\\"([^\n\"]*?)\\\")?>", Pattern.MULTILINE));
|
||||||
closeTags.put(type, Pattern.compile("</" + tagName + ">"));
|
closeTags.put(type, Pattern.compile("</" + tagName + ">"));
|
||||||
|
|
||||||
nextTokenTags.put(type, Pattern.compile("<" + tagName + "\\s*(desc=\\\"([^\n\"]*?)\\\")?:>", Pattern.MULTILINE));
|
nextTokenTags.put(type, Pattern.compile("<" + tagName + "\\s*((desc)?=\\\"([^\n\"]*?)\\\")?:>", Pattern.MULTILINE));
|
||||||
closedTags.put(type, Pattern.compile("<" + tagName + "\\s*(desc=\\\"([^\n\"]*?)\\\")?/>", Pattern.MULTILINE));
|
closedTags.put(type, Pattern.compile("<" + tagName + "\\s*((desc)?=\\\"([^\n\"]*?)\\\")?/>", Pattern.MULTILINE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -323,7 +323,7 @@ public class JetMacro extends BaseMacro {
|
|||||||
Pattern open = openTags.get(type);
|
Pattern open = openTags.get(type);
|
||||||
Matcher openMatcher = matchFrom(code, i, open);
|
Matcher openMatcher = matchFrom(code, i, open);
|
||||||
if (openMatcher != null) {
|
if (openMatcher != null) {
|
||||||
tagStack.push(new TagData(type, openMatcher.group(2), position, false));
|
tagStack.push(new TagData(type, openMatcher.group(3), position, false));
|
||||||
i += openMatcher.end() - 1;
|
i += openMatcher.end() - 1;
|
||||||
continue charLoop;
|
continue charLoop;
|
||||||
}
|
}
|
||||||
@@ -350,7 +350,7 @@ public class JetMacro extends BaseMacro {
|
|||||||
Pattern closed = closedTags.get(type);
|
Pattern closed = closedTags.get(type);
|
||||||
Matcher closedMatcher = matchFrom(code, i, closed);
|
Matcher closedMatcher = matchFrom(code, i, closed);
|
||||||
if (closedMatcher != null) {
|
if (closedMatcher != null) {
|
||||||
TagData tag = new TagData(type, closedMatcher.group(2), position, false);
|
TagData tag = new TagData(type, closedMatcher.group(3), position, false);
|
||||||
tag.end = position;
|
tag.end = position;
|
||||||
tags.add(tag);
|
tags.add(tag);
|
||||||
i += closedMatcher.end() - 1;
|
i += closedMatcher.end() - 1;
|
||||||
@@ -360,7 +360,7 @@ public class JetMacro extends BaseMacro {
|
|||||||
Pattern next = nextTokenTags.get(type);
|
Pattern next = nextTokenTags.get(type);
|
||||||
Matcher nextMatcher = matchFrom(code, i, next);
|
Matcher nextMatcher = matchFrom(code, i, next);
|
||||||
if (nextMatcher != null) {
|
if (nextMatcher != null) {
|
||||||
TagData tag = new TagData(type, nextMatcher.group(2), position, true);
|
TagData tag = new TagData(type, nextMatcher.group(3), position, true);
|
||||||
tags.add(tag);
|
tags.add(tag);
|
||||||
tag.end = code.length();
|
tag.end = code.length();
|
||||||
i += nextMatcher.end() - 1;
|
i += nextMatcher.end() - 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user