Răsfoiți Sursa

Add word boundary matchers around GLTFLoader regular expressions to avoid replacing partial word matches (#9897)

Rich Tibbett 8 ani în urmă
părinte
comite
baff496795
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      examples/js/loaders/GLTFLoader.js

+ 1 - 1
examples/js/loaders/GLTFLoader.js

@@ -664,7 +664,7 @@ var replaceTHREEShaderAttributes = function( shaderText, technique ) {
 
 		var semantic = param.semantic;
 
-		var regEx = new RegExp( pname, "g" );
+		var regEx = new RegExp( "\\b" + pname + "\\b", "g" );
 
 		switch ( semantic ) {