mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-27 10:46:09 +01:00
This commit is contained in:
parent
d1ed86efe7
commit
31dcead35f
1 changed files with 6 additions and 0 deletions
|
|
@ -635,6 +635,12 @@ export const updateAVName = (protyle: IProtyle, blockElement: Element) => {
|
|||
const avId = blockElement.getAttribute("data-av-id");
|
||||
const id = blockElement.getAttribute("data-node-id");
|
||||
const nameElement = blockElement.querySelector(".av__title") as HTMLElement;
|
||||
// https://github.com/siyuan-note/siyuan/issues/14770
|
||||
if (nameElement.textContent === "") {
|
||||
nameElement.querySelectorAll("br").forEach(item => {
|
||||
item.remove();
|
||||
});
|
||||
}
|
||||
const newData = nameElement.textContent.trim();
|
||||
if (newData === nameElement.dataset.title.trim()) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue