Skip to content

Commit

Permalink
fix: support commas and spaces in linksToSkip (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored Dec 29, 2020
1 parent 39cf9d2 commit a7d8625
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ async function main() {
};
if (flags.skip) {
if (typeof flags.skip === 'string') {
opts.linksToSkip = flags.skip.split(' ').filter(x => !!x);
opts.linksToSkip = flags.skip.split(/[\s,]+/).filter(x => !!x);
} else if (Array.isArray(flags.skip)) {
opts.linksToSkip = flags.skip;
}
Expand Down
2 changes: 1 addition & 1 deletion test/zcli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('cli', () => {
'--verbosity',
'INFO',
'--skip',
'LICENSE.md',
'"LICENSE.md, unlinked.md"',
'test/fixtures/markdown/README.md',
]);
assert.match(res.stdout, /\[SKP\]/);
Expand Down

0 comments on commit a7d8625

Please sign in to comment.