Skip to content

Commit 0668084

Browse files
authored
Improve parsing of ignoreDirectories (#71)
* Omit both leading and trailing slash from ignoreDirectories
1 parent 510d339 commit 0668084

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pluginCore.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ exports.generateFilePaths = async function ({
5050
ignoreDirectories.length === 0
5151
? ASTERISK
5252
: ignoreDirectories.map(
53-
// add ! and strip leading slash
54-
(dir) => `!${dir.replace(/^\/+/, '')}`,
53+
// add ! and strip leading and trailing slashes
54+
(dir) => `!${dir.replace(/^\/|\/$/g, '')}`,
5555
)
5656
const htmlFilePaths = await Promise.all(
5757
fileAndDirPaths.map((fileAndDirPath) => findHtmlFiles(`${publishDir}${fileAndDirPath}`, directoryFilter)),

0 commit comments

Comments
 (0)