Parcourir la source

Lua: Add special fix to handle double $$ situations with matched groups in regex

Justin Donaldson il y a 9 ans
Parent
commit
531cdee9fe
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      std/lua/_std/EReg.hx

+ 1 - 1
std/lua/_std/EReg.hx

@@ -114,7 +114,7 @@ class EReg {
 	}
 
 	public function replace( s : String, by : String ) : String {
-		by = Rex.gsub(by, "\\$", "%%");
+		by = Rex.gsub(by, "\\$*\\$", "%%");
 		return Rex.gsub(s,r,by, global ? null : 1);
 	}