internal-link-present-evaluate.js 329 B

12345678910
  1. import { querySelectorAll } from '../../core/utils';
  2. function internalLinkPresentEvaluate(node, options, virtualNode) {
  3. const links = querySelectorAll(virtualNode, 'a[href]');
  4. return links.some(vLink => {
  5. return /^#[^/!]/.test(vLink.actualNode.getAttribute('href'));
  6. });
  7. }
  8. export default internalLinkPresentEvaluate;