Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2023-05-06 15:44:39 +08:00
commit db6521181e
5 changed files with 9 additions and 5 deletions

View file

@ -423,7 +423,7 @@
"addAttr": "Add",
"addTag": "Add Tag",
"width": "Width",
"attrName": "Key",
"attrName": "Attribute name",
"attr": "Attribute",
"updatePath": "Change dir",
"default": "Default",

View file

@ -423,7 +423,7 @@
"addAttr": "Añadir",
"addTag": "Añadir etiqueta",
"width": "Ancho",
"attrName": "Clave",
"attrName": "Nombre del atributo",
"attr": "Atributo",
"updatePath": "Cambiar directorio",
"default": "Por defecto",

View file

@ -423,7 +423,7 @@
"addAttr": "Ajouter",
"addTag": "Ajouter Tag",
"width": "Largeur",
"attrName": "Key",
"attrName": "Nom de l'attribut",
"attr": "Attribut",
"updatePath": "modifier le répertoire",
"default": "Default",

View file

@ -310,7 +310,7 @@ export const openFileAttr = (attrs: IObject, id: string, focusName = "bookmark")
name = "custom-" + (item.parentElement.querySelector(".b3-text-field") as HTMLInputElement).value;
}
if (item.value.trim()) {
if (!/^[0-9a-zA-Z\-]*$/.test(name.replace("custom-", "")) || name === "custom-") {
if (!/^custom-[_.\-0-9a-zA-Z]+$/.test(name)) {
errorTip += name.replace("custom-", "") + ", ";
return;
}
@ -381,7 +381,7 @@ export const openAttr = (nodeElement: Element, protyle: IProtyle, focusName = "b
name = "custom-" + (item.parentElement.querySelector(".b3-text-field") as HTMLInputElement).value;
}
if (item.value.trim()) {
if (!/^[0-9a-zA-Z\-]*$/.test(name.replace("custom-", "")) || name === "custom-") {
if (!/^custom-[_.\-0-9a-zA-Z]+$/.test(name)) {
errorTip += name.replace("custom-", "") + ", ";
return;
}

View file

@ -729,6 +729,10 @@ func assetsLinkDestsInTree(tree *parse.Tree) (ret []string) {
return ast.WalkContinue
}
if !strings.Contains(n.TextMarkFileAnnotationRefID, "/") {
return ast.WalkContinue
}
dest := n.TextMarkFileAnnotationRefID[:strings.LastIndexByte(n.TextMarkFileAnnotationRefID, '/')]
dest = strings.TrimSpace(dest)
ret = append(ret, dest)