INNER CODE UNIT · TypeScript
rest
software-mansion/react-native-enriched-html · src/web/pmPlugins/AutolinkPlugin/index.ts:144
const rest = mapping.slice(i + 1);
stepMap.forEach((_oldStart, _oldEnd, newStart, newEnd) => {
const from = Math.max(0, rest.map(newStart, -1) - 1);
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;
});
});
});