mirror of
https://github.com/unarray/file-tree-generator.git
synced 2026-07-22 08:40:29 +00:00
Update regex
This commit is contained in:
parent
b4c092460a
commit
f6fe5c18fd
1 changed files with 1 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ import { haveChilds } from "./parser.util";
|
|||
|
||||
export const filesToExplorerEntity = (files: string[], removeBasePath = "", separator: string | null = null): ExplorerEntity => {
|
||||
separator = separator ?? path.sep;
|
||||
const regex = new RegExp(`/^${escapeString(removeBasePath)}/`);
|
||||
const regex = new RegExp(`^${escapeString(removeBasePath)}`);
|
||||
const structure: ExplorerEntity = {};
|
||||
|
||||
for (const file of files) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue