浏览代码

Examples: Simplified tags code.

Mr.doob 5 年之前
父节点
当前提交
e78da3304d
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      examples/index.html

+ 2 - 3
examples/index.html

@@ -249,9 +249,8 @@
 
 			var link = links[ file ];
 			var name = getName( file );
-			var matchCandidates = ( tags[ file ] || [] ).slice();
-			matchCandidates.push( file );
-			var res = matchCandidates.join( ' ' ).match( exp );
+			if ( file in tags ) file += tags[ file ].join( ' ' );
+			var res = file.match( exp );
 			var text;
 
 			if ( res && res.length > 0 ) {