浏览代码

Merge branch 'master' into t/ckeditor5-react/58

Kamil Piechaczek 6 年之前
父节点
当前提交
36d8ad4920
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      scripts/docs/snippetadapter.js

+ 4 - 3
scripts/docs/snippetadapter.js

@@ -212,10 +212,11 @@ function filterWhitelistedSnippets( snippets, whitelistedSnippets ) {
 
 	// Find all snippets that matched to specified criteria.
 	for ( const snippetData of snippets ) {
-		const matchToPatterns = whitelistedSnippets.some( pattern => minimatch( snippetData.snippetName, pattern ) );
+		const shouldBeBuilt = whitelistedSnippets.some( pattern => {
+			return minimatch( snippetData.snippetName, pattern ) || snippetData.snippetName.includes( pattern );
+		} );
 
-		// Snippet should be built.
-		if ( matchToPatterns ) {
+		if ( shouldBeBuilt ) {
 			snippetsToBuild.add( snippetData );
 		}
 	}