*
Determine if a node qualifies as phrasing content.
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content
482193
function(node) {
    return node.nodeType === this.TEXT_NODE || this.PHRASING_ELEMS.indexOf(node.tagName) !== -1 ||
      ((node.tagName === "A" || node.tagName === "DEL" || node.tagName === "INS") &&
        this._everyNode(node.childNodes, this._isPhrasingContent));
  }
866504
function(node) {
      if (!node.value || !node.value.body || !node.value.body.body) {
        return false;
      }
      var i = node.value.body.body.length - 1;
      for (; i >= 0; i--) {
        if (node.value.body.body[i].type === 'ReturnStatement') {
          return node.value.body.body[i];
        }
      }
      return false;
    }
1151435
public boolean includesDefinedInContent() {

        if ((m_types == null) || m_types.isEmpty()) {
            return true;
        }
        Iterator<CmsRelationType> itTypes = m_types.iterator();
        while (itTypes.hasNext()) {
            CmsRelationType type = itTypes.next();
            if (type.isDefinedInContent()) {
                return true;
            }
        }
        return false;
    }
635355
function questionBlock(nodes) {
    return nodes.slice(
        nodes[0].type === 'paragraph' ? 1 : 0,
        _.findIndex(nodes, { type: 'blockquote_start' })
    );
}
234491
function hasBlocksOnLine(node, first) {

	// special case for firstNode:
	// we're at sol so ignore possible \n at first char
	if (first) {
		if (node.textContent.substring(1).match(/\n/)) {
			return false;
		}
		node = node.nextSibling;
	}

	while (node) {
		if (DOMUtils.isElt(node)) {
			if (DOMUtils.isBlockNode(node)) {
				return !startsOnANewLine(node);
			}
			if (node.hasChildNodes()) {
				if (hasBlocksOnLine(node.firstChild, false)) {
					return true;
				}
			}
		} else {
			if (node.textContent.match(/\n/)) {
				return false;
			}
		}
		node = node.nextSibling;
	}
	return false;
}
156026
private static boolean doesElementContainTranslatableContentV2(final Node node) {
        final NodeList children = node.getChildNodes();
        if (children != null) {
            // check to see if any of the children are translatable nodes
            for (int j = 0; j < children.getLength(); ++j) {
                final Node child = children.item(j);
                final String childName = child.getNodeName();

                if (TRANSLATABLE_ELEMENTS_OLD.contains(childName)) {
                    // This child node is itself translatable, so return true
                    return true;
                } else if (doesElementContainTranslatableContentV2(child)) {
                    // check if this child contains translatable nodes
                    return true;
                }
            }
        }

        return false;
    }
935477
function checkLiteral(node) {
            const token = sourceCode.getFirstToken(node),
                nodeType = token.type,
                nodeValue = token.value;

            if (nodeType === "RegularExpression") {
                checkRegex(node, nodeValue, token.range[0]);
            }
        }
802403
function isHTMLTag(html) {
    if (typeof HTMLElement === 'object') {
        return (html && (html instanceof HTMLElement));
    }

    return !!(html && html.nodeType && html.nodeType === 1);
}
596854
function findContentNode(el) {
        if (!el) {
            return;
        }
        var oldCebContentId = el.getAttribute(OLD_CONTENT_ID_ATTR_NAME);
        if (oldCebContentId) {
            return findContentNode(el.querySelector('[' + oldCebContentId + ']')) || el;
        }
        return el;
    }
738587
def is_docstring(node):
    
    return (node.type == syms.simple_stmt and
            len(node.children) > 0 and node.children[0].type == token.STRING)
1255541
private boolean checkElementName(final Node node) {
        return TOPIC_INDEXTERM.matches(node)
                || INDEXING_D_INDEX_SORT_AS.matches(node)
                || INDEXING_D_INDEX_SEE.matches(node)
                || INDEXING_D_INDEX_SEE_ALSO.matches(node);
    }
249791
public static boolean hasNavigableWebContent(
            Context context, AccessibilityNodeInfoCompat node) {
        return (supportsWebActions(node) && isScriptInjectionEnabled(context))
                || hasNativeWebContent(node);
    }
1367594
function isInlineNode(node) {
        return dom.isCharacterDataNode(node) ||
                (node.nodeType == 1 && inlineDisplayRegex.test(getComputedStyleProperty(node, "display")));
    }
1214229
function isInternalNode (node) {
  let tagName = (typeof node === 'string') ? node : node.tagName
  if (tagName && tagName.toLowerCase().indexOf('mip-i-') === 0) {
    return true
  }

  if (node.tagName && (node.hasAttribute('placeholder') ||
      node.hasAttribute('fallback') ||
      node.hasAttribute('overflow'))) {
    return true
  }
  return false
}
88069
def contains_content(browser, content):
    
    for elem in browser.find_elements_by_xpath(str(
            '//*[contains(normalize-space(.), {content}) '
            'and not(./*[contains(normalize-space(.), {content})])]'
            .format(content=string_literal(content)))):

        try:
            if elem.is_displayed():
                return True
        except StaleElementReferenceException:
            pass

    return False
1370967
void assertPhrasingContent() throws InvalidInputException {
    assertContentModel(Arrays.asList(TextNode.class, Link.class, Chime.class, Bold.class, Italic.class, Image.class,
        LineBreak.class, Span.class, Emoji.class, HashTag.class, CashTag.class, Mention.class));
  }
624902
function tryClassifyNode(node) {
                if (ts.isJSDocTag(node)) {
                    return true;
                }
                if (ts.nodeIsMissing(node)) {
                    return true;
                }
                var classifiedElementName = tryClassifyJsxElementName(node);
                if (!ts.isToken(node) && node.kind !== 244 /* JsxText */ && classifiedElementName === undefined) {
                    return false;
                }
                var tokenStart = node.kind === 244 /* JsxText */ ? node.pos : classifyLeadingTriviaAndGetTokenStart(node);
                var tokenWidth = node.end - tokenStart;
                ts.Debug.assert(tokenWidth >= 0);
                if (tokenWidth > 0) {
                    var type = classifiedElementName || classifyTokenType(node.kind, node);
                    if (type) {
                        pushClassification(tokenStart, tokenWidth, type);
                    }
                }
                return true;
            }