mirror of https://github.com/curbengh/hexo-yam
Fixed 'exclude' config does not work issue
Matching paths require add the `{ matchBase: true }` paramter
This commit is contained in:
parent
892cde9a78
commit
0089858eb8
|
@ -20,7 +20,7 @@ function logic_html(str, data) {
|
||||||
|
|
||||||
if (path && exclude && exclude.length) {
|
if (path && exclude && exclude.length) {
|
||||||
for (var i = 0, len = exclude.length; i < len; i++) {
|
for (var i = 0, len = exclude.length; i < len; i++) {
|
||||||
if (minimatch(path, exclude[i])) return str;
|
if (minimatch(path, exclude[i], {matchBase: true})) return str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ function logic_css(str, data) {
|
||||||
|
|
||||||
if (path && exclude && exclude.length) {
|
if (path && exclude && exclude.length) {
|
||||||
for (var i = 0, len = exclude.length; i < len; i++) {
|
for (var i = 0, len = exclude.length; i < len; i++) {
|
||||||
if (minimatch(path, exclude[i])) return str;
|
if (minimatch(path, exclude[i], {matchBase: true})) return str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ function logic_js(str, data) {
|
||||||
|
|
||||||
if (path && exclude && exclude.length) {
|
if (path && exclude && exclude.length) {
|
||||||
for (var i = 0, len = exclude.length; i < len; i++) {
|
for (var i = 0, len = exclude.length; i < len; i++) {
|
||||||
if (minimatch(path, exclude[i])) return str;
|
if (minimatch(path, exclude[i], {matchBase: true})) return str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue