mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-02 18:32:28 +08:00
This commit is contained in:
parent
30497dd942
commit
f5fced6bb4
@ -34,7 +34,11 @@ export const validateName = (name: string, targetElement?: HTMLElement) => {
|
||||
};
|
||||
|
||||
export const replaceFileName = (name: string) => {
|
||||
return name.replace(/\r\n|\r|\n|\u2028|\u2029|\t|/g, "").replace(/\//g, "/").substring(0, Constants.SIZE_TITLE);
|
||||
if (name.indexOf("/") > -1) {
|
||||
showMessage(window.siyuan.languages.fileNameRule);
|
||||
name = name.replace(/\//g, "/");
|
||||
}
|
||||
return name.replace(/\r\n|\r|\n|\u2028|\u2029|\t|/g, "").substring(0, Constants.SIZE_TITLE);
|
||||
};
|
||||
|
||||
export const replaceLocalPath = (name: string) => {
|
||||
|
Loading…
Reference in New Issue
Block a user