mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-07-03 14:09:06 +02:00
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user