solo mostrar enlaces si se está en un bloque
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
076d661027
commit
c98a5c8319
1 changed files with 4 additions and 0 deletions
|
@ -31,6 +31,10 @@
|
|||
function getLinks(node) {
|
||||
/** @type {Link[]} */
|
||||
let links = [];
|
||||
|
||||
// a veces selecciona el documento entero y no queremos mostrar todos los enlaces
|
||||
if (node.type.spec.group !== "block") return [];
|
||||
|
||||
let lastWasLinkMark = false;
|
||||
node.descendants((node) => {
|
||||
for (const mark of node.marks) {
|
||||
|
|
Loading…
Reference in a new issue