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) {
|
function getLinks(node) {
|
||||||
/** @type {Link[]} */
|
/** @type {Link[]} */
|
||||||
let links = [];
|
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;
|
let lastWasLinkMark = false;
|
||||||
node.descendants((node) => {
|
node.descendants((node) => {
|
||||||
for (const mark of node.marks) {
|
for (const mark of node.marks) {
|
||||||
|
|
Loading…
Reference in a new issue