Skip to content

Commit 7c67b2a

Browse files
committed
Velocity: fix comment hash '#' escapes
1 parent 3d01368 commit 7c67b2a

File tree

1 file changed

+1
-1
lines changed
  • src/main/java/com/nativelibs4java/velocity

1 file changed

+1
-1
lines changed

src/main/java/com/nativelibs4java/velocity/Utils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected static String processComments(String source, Function<String, String>
3131
protected static String quoteSharpsInComments(String source) {
3232
return processComments(source, new Function<String, String>() {
3333
public String apply(String f) {
34-
return f.replaceAll("#", "\\\\#");
34+
return f.replaceAll("(?<=\\w)#", "\\\\#");
3535
}
3636
});
3737
}

0 commit comments

Comments
 (0)