Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
MuiseDestiny committed Apr 4, 2024
1 parent e798443 commit daa6bc4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"@typescript-eslint"
],
"rules": {
"no-control-regex": 0,
"@typescript-eslint/ban-ts-comment": [
"warn",
{
Expand Down
7 changes: 5 additions & 2 deletions src/modules/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ export async function moveFile(attItem: Zotero.Item) {
Zotero.Attachments.getFileBaseNameFromItem(
attItem.topLevelItem,
formatString,
)
),
);
}
})
Expand Down Expand Up @@ -721,7 +721,10 @@ function getValidFolderName(folderName: string): string {
folderName = folderName.replace(/[\u200B-\u200E]/g, "");
// Strip characters not valid in XML, since they won't sync and they're probably unwanted
// eslint-disable-next-line no-control-regex
folderName = folderName.replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\ud800-\udfff\ufffe\uffff]/g, "");
folderName = folderName.replace(
/[\u0000-\u0008\u000b\u000c\u000e-\u001f\ud800-\udfff\ufffe\uffff]/g,
"",
);
// Normalize to NFC
folderName = folderName.normalize();
// Replace bidi isolation control characters
Expand Down

0 comments on commit daa6bc4

Please sign in to comment.