提交 2079f75d 编写于 作者: M Michael Herzog 提交者: Mr.doob

Docs: Fix tags in filter result. (#22108)

上级 bdb868f4
......@@ -381,21 +381,9 @@
const categoryClassList = linkElement.parentElement.classList;
const filterResults = pageName.match( regExp );
if ( filterResults && filterResults.length > 0 ) {
if ( filterResults !== null && filterResults.length > 0 ) {
// Accentuate matching characters
for ( let i = 0; i < filterResults.length; i ++ ) {
const result = filterResults[ i ];
if ( result !== '' ) {
pageName = pageName.replace( result, '<b>' + result + '</b>' );
}
}
pageName = pageName.replaceAll( regExp, '<b>$&</b>' );
categoryClassList.remove( 'hidden' );
linkElement.innerHTML = pageName;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册