hasAnyTagInPath method

bool hasAnyTagInPath(
  1. List<String> tags
)

searches the path for any tag specified in tags and returns true, iff one of the parent nodes contains at least one of these tags

Implementation

bool hasAnyTagInPath(List<String> tags) {
  NodeV2? k = this;

  while (k != null) {
    if (tags.contains(k.tagName)) return true;

    k = k.parent;
  }

  return false;
}