Skip to content

Commit

Permalink
fix(scanner): do not add extra underscore characters
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmlnc committed Dec 5, 2019
1 parent 803fe37 commit 4d4e254
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/services/scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,12 @@ export default class ScannerService {
private _formatPartialFilepath(filepath: string): string {
const original = path.parse(filepath);

const hasUnderscorePrefix = original.base[0] === '_';
const base = hasUnderscorePrefix ? original.base : `_${original.base}`;

return path.format({
...original,
base: '_' + original.base
base
});
}
}

0 comments on commit 4d4e254

Please sign in to comment.