Skip to content

Commit

Permalink
Allow "<-" in the flag command
Browse files Browse the repository at this point in the history
Technically that should be read as a tag opening... but we're going to
ignore it explicitly (while the old tag system ignored it implicitly)
  • Loading branch information
mcmonkey4eva committed Sep 26, 2014
1 parent 6655246 commit 830d84e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/net/aufdemrand/denizen/tags/TagManager.java
Expand Up @@ -247,12 +247,17 @@ private static int[] locateTag(String arg) {
int first = arg.indexOf('<');
if (first == -1)
return null;
// Handle "<-" for the flag command
if (first + 1 < arg.length() && (arg.charAt(first + 1) == '-')) {
return locateTag(arg.substring(0, first) + (char)0x01 + arg.substring(first + 1));
}
int len = arg.length();
int bracks = 0;
int second = -1;
for (int i = first + 1; i < len; i++) {
if (arg.charAt(i) == '<')
if (arg.charAt(i) == '<') {
bracks++;
}
else if (arg.charAt(i) == '>') {
bracks--;
if (bracks == -1) {
Expand Down

0 comments on commit 830d84e

Please sign in to comment.