JS: improve whitespace handling for multi-license file recognition

This commit is contained in:
Esben Sparre Andreasen
2018-12-11 09:30:10 +01:00
parent e016098f86
commit edbef289a7
3 changed files with 8 additions and 1 deletions

View File

@@ -225,7 +225,7 @@ predicate isMultiLicenseBundle(TopLevel tl) {
// case: ordinary block comments with "@license" lines
count(BlockComment head |
head.getTopLevel() = tl and
head.getLine(_).regexpMatch("(?i) *\\* @license .*")
head.getLine(_).regexpMatch("(?i)[\\s*]*@license\\b.*")
) > 1
}