INNER CODE UNIT · TypeScript
wordEnd
software-mansion/react-native-enriched-html · src/web/pmPlugins/AutolinkPlugin/index.ts:210
const wordEnd = wordStart + word.length;
const ranges = findAutolinkRangesInWord(word, state.linkRegex);
const fullMatch = ranges.some(
(r) => r.start === 0 && r.endExclusive === word.length
);
if (!fullMatch) continue;
if (rangeHasManualLink(doc, linkType, wordStart, wordEnd))
continue;
desiredLinks.push({
start: wordStart,
end: wordEnd,
href: word,
});
}
}