Skip to content

Commit 8c55435

Browse files
committed
Backport the tag escape fix
1 parent bcd27ce commit 8c55435

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ org.gradle.jvmargs=-Xmx1G
1111
fabric_version=0.119.1+1.21.5
1212

1313
# Mod Properties
14-
mod_version = 2.6.3+1.21.5
14+
mod_version = 2.6.4+1.21.5
1515
maven_group = eu.pb4
1616
archives_base_name = placeholder-api

src/main/java/eu/pb4/placeholders/api/parsers/TagLikeParser.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,9 @@ public interface Format {
371371
if (x != null) {
372372
return x;
373373
}
374+
if (string.charAt(i) == '\\' && maxLength > i + 1) {
375+
i++;
376+
}
374377
}
375378
return null;
376379
}

src/main/java/eu/pb4/placeholders/impl/textparser/MultiTagLikeParser.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ protected void handleLiteral(String value, Context context) {
3636
}
3737

3838
if (tag == null) {
39+
if (value.charAt(tPos) == '\\' && value.length() > tPos + 1) {
40+
tPos++;
41+
}
3942
tPos++;
4043
} else {
4144
break;

0 commit comments

Comments
 (0)