INNER CODE UNIT · TypeScript

to

software-mansion/react-native-enriched-html · src/web/pmPlugins/AutolinkPlugin/index.ts:148

      const to = Math.min(docSize, rest.map(newEnd, 1) + 1);

      doc.nodesBetween(from, to, (node, pos) => {
        if (node.type.name === 'codeBlock') return false;

        if (node.inlineContent && !blocks.has(pos)) {
          blocks.set(pos, node);
          return false;
        }

        return true;
      });
    });
  });

  return Array.from(blocks, ([pos, node]) => ({ pos, node }));
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…