Custom IAL attr name support more symbol (#8172)
* 🎨 custom ial key support '_' symbol
* Revert "🎨 custom ial key support '_' symbol"
This reverts commit 50883cb4e1
.
* 🎨 custom ial key support `_` and `.` symbol
* Update commonMenuItem.ts
This commit is contained in:
parent
9f6983cd09
commit
825822ec93
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue