Skip to content

Commit

Permalink
Merge pull request #346 from trivir/bugfix/remove-colons-from-filenames
Browse files Browse the repository at this point in the history
Remove colons from file names
  • Loading branch information
vscheuber authored Nov 21, 2023
2 parents f166859 + 126f60c commit 940fae4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/ExportImportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ export function validateImport(metadata): boolean {
}

export function getTypedFilename(name: string, type: string, suffix = 'json') {
const slug = slugify(name.replace(/^http(s?):\/\//, ''));
const slug = slugify(name.replace(/^http(s?):\/\//, ''), {
remove: /[^\w\s$*_+~.()'"!\-@]+/g,
});
return `${slug}.${type}.${suffix}`;
}

Expand Down

0 comments on commit 940fae4

Please sign in to comment.