Skip to content

Commit

Permalink
🎨 fix #9291
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Oct 1, 2023
1 parent df487a7 commit 4653754
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/src/protyle/render/av/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ style="width: ${column.width || "200px"}">${getCalcValue(column) || '<svg><use x
if (cell.valueType === "text") {
text = `<span class="av__celltext">${cell.value?.text.content || ""}</span>`;
} else if (["url", "email", "phone"].includes(cell.valueType)) {
text = `<span class="av__celltext av__celltext--url" data-type="${cell.valueType}">${cell.value ? cell.value[cell.valueType as "url"].content : ""}</span>`;
const urlContent = cell.value ? cell.value[cell.valueType as "url"].content : "";
// https://github.com/siyuan-note/siyuan/issues/9291
let urlAttr = "";
if (cell.valueType === "url") {
urlAttr = ` data-href="${urlContent}"`;
}
text = `<span class="av__celltext av__celltext--url" data-type="${cell.valueType}"${urlAttr}>${urlContent}</span>`;
if (cell.value && cell.value[cell.valueType as "url"].content) {
text += `<span data-type="copy" class="b3-tooltips b3-tooltips__n block__icon" aria-label="${window.siyuan.languages.copy}"><svg><use xlink:href="#iconCopy"></use></svg></span>`;
}
Expand Down

0 comments on commit 4653754

Please sign in to comment.