@mintlify/scraping
Version:
Scrape documentation frameworks to Mintlify docs
15 lines • 424 B
JavaScript
import { CONTINUE, SKIP, visit } from 'unist-util-visit';
export function getText(element) {
if (!element)
return '';
let text = '';
visit(element, function (node) {
if (node.type === 'element' && node.tagName === 'svg')
return SKIP;
if (node.type === 'text')
text += node.value;
return CONTINUE;
});
return text;
}
//# sourceMappingURL=text.js.map