INNER CODE UNIT · TypeScript
blockFrom
software-mansion/react-native-enriched-html · src/web/pmPlugins/AutolinkPlugin/index.ts:196
const blockFrom = pos + 1;
const blockTo = pos + node.nodeSize - 1;
// find all valid links that should exist in this block
const desiredLinks: Array<{
start: number;
end: number;
href: string;
}> = [];
for (const run of extractRuns(node, pos, schema)) {
for (const match of run.text.matchAll(WHITESPACE_RE)) {
const word = match[0];
const wordStart = run.startPos + match.index!;
const wordEnd = wordStart + word.length;
const ranges = findAutolinkRangesInWord(word, state.linkRegex);
const fullMatch = ranges.some(