Explorar o código

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

Justin Donaldson %!s(int64=9) %!d(string=hai) anos
pai
achega
531cdee9fe
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);
 	}