A wrapper to the highlight method to determine when the highlighting
process should occur.

@param  {string} subject
The body of text that will be searched for highlighted words.

@return {Array}
An array of ReactElements
510835
function(subject) {
    if (this.isScalar() && this.hasSearch()) {
      var search = this.getSearch();
      return this.highlightChildren(subject, search);
    }

    return this.props.children;
  }
1260888
function (subject) {
    var kb = UI.store
    var t = kb.findTypeURIs(subject)
    if (t['http://www.w3.org/2005/01/wf/flow#Task'] ||
      kb.holds(subject, UI.ns.wf('tracker'))) return 'issue' // in case ontology not available
    if (t['http://www.w3.org/2005/01/wf/flow#Tracker']) return 'tracker'
    // Later: Person. For a list of things assigned to them,
    // open bugs on projects they are developer on, etc
    return null // No under other circumstances (while testing at least!)
  }
1239181
function( elems, name, selector ) {

		// Build a new jQuery matched element set
		var ret = jQuery.merge( this.constructor(), elems );

		// Add the old object onto the stack (as a reference)
		ret.prevObject = this;

		ret.context = this.context;

		if ( name === "find" ) {
			ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
		} else if ( name ) {
			ret.selector = this.selector + "." + name + "(" + selector + ")";
		}

		// Return the newly-formed element set
		return ret;
	}
1073848
protected final Element generateSubjectElement(final DCSubject subject) {

        final Element subjectElement = new Element("subject", getDCNamespace());

        final String taxonomyUri = subject.getTaxonomyUri();
        final String value = subject.getValue();

        if (taxonomyUri != null) {

            final Attribute resourceAttribute = new Attribute("resource", taxonomyUri, getRDFNamespace());

            final Element topicElement = new Element("topic", getTaxonomyNamespace());
            topicElement.setAttribute(resourceAttribute);

            final Element descriptionElement = new Element("Description", getRDFNamespace());
            descriptionElement.addContent(topicElement);

            if (value != null) {
                final Element valueElement = new Element("value", getRDFNamespace());
                valueElement.addContent(value);
                descriptionElement.addContent(valueElement);
            }

            subjectElement.addContent(descriptionElement);

        } else {
            subjectElement.addContent(value);
        }

        return subjectElement;
    }
228522
function Highlighter(doc, type) {
        type = type || "textContent";
        this.doc = doc || document;
        this.classAppliers = {};
        this.highlights = [];
        this.converter = getConverter(type);
    }
709284
function highlightString(str, indexes){

    // If there's nothing to do, return immediately
    if(!indexes || !indexes.length) return str;

    var out = '';

    // Loop through string one character at a time, highlighting as necessary
    for(var i = 0; i < str.length; i += 1){
      out += indexes.indexOf(i) !== -1 ? str.charAt(i).bold() : str.charAt(i);
    }
    return out;
  }
1255271
function (searchQuery) {

        var selector = page.googleSearch.elements.searchInput;

        // return a promise so the calling function knows the task has completed
        return driver.findElement(selector).sendKeys(searchQuery, selenium.Key.ENTER);
    }
103204
function emitOneElement(element, name, onLeave) {
  if (typeof element === 'object') {
    emitStart.call(this, name, element.$);
    if (__own.call(element, '$children')) {
      emitChildren.call(this, element.$children);
    } else {
      var hasText = false;
      for (var child in element) {
        if (__own.call(element, child) && child !== '$' && child != '$name') {
          if (child === '$text') {
            hasText = true;
          } else {
            emitElement.call(this, element[child], child);
          }
        }
      }
      if (hasText) {
        emitText.call(this, element.$text);
      }
    }
  } else {
    emitStart.call(this, name, element.$);
    emitText.call(this, element);
  }
  if (!onLeave) {
    emitEnd.call(this, name);
  }
}
596127
function(v) {
    if (v === undefined) return this._element;
    if (typeof v === 'string') {
      v = window.document.querySelector(v);
    }
    this._element = v;
    return this;
  }
866635
function (s) {
      settings.display = [];
      var tokens = s.split(',');
      for (var i = 0, length = tokens.length; i < length; i++) {
        var method = $.trim(tokens[i]);
        method = method.toUpperCase();
        var mapped = morpheus.VectorTrack.RENDER[method];
        if (mapped !== undefined) {
          settings.display.push(mapped);
        } else if (method === 'DISCRETE') {
          _this.getFullVector().getProperties().get(morpheus.VectorKeys.DISCRETE, true);
        } else if (method === 'CONTINUOUS') {
          _this.getFullVector().getProperties().set(morpheus.VectorKeys.DISCRETE, false);
        } else if (method === 'HIGHLIGHT') {
          settings.highlightMatchingValues = true;
        } else if (method === 'STACKED_BAR') {
          settings.stackedBar = true;
          settings.display.push(morpheus.VectorTrack.RENDER.BAR);
        } else if (method === 'TOOLTIP') {
          settings.inlineTooltip = true;
        } else {
          console.log(method + ' not found.');
        }
      }
    }
492737
function findElementSelectors() {
	/* jshint validthis:true */
	var self = this;

	// reset selectors
	this.selectors = [];

	this.testFiles.forEach(function(item) {
		self.selectors = self.selectors.concat(findSelectors.init(item));
	});

	checkSelectorViewMatches.call(this);
}
742696
function onPagerendered(obj) {
        cache[obj.url] = {
            resource: obj.resource,
            time: Date.now()
        };

        //page render end
        trigger('onpagerendercomplete',{
            url : obj.url
        });
    }
993191
static boolean isSelected(IChemObject object, RendererModel model) {
        if (object.getProperty(StandardGenerator.HIGHLIGHT_COLOR) != null) return true;
        if (model.getSelection() != null) return model.getSelection().contains(object);
        return false;
    }
328178
function highlightDataPoints(dataPoint) {
            cleanDataPointHighlights();

            const nodes = paths.nodes()
            const nodesById = nodes.reduce((acc, node) => {
                acc[node.id] = node

                return acc;
            }, {});

            // Group corresponding path node with its topic, and
            // sorting the topics based on the order of the colors,
            // so that the order always stays constant
            const topicsWithNode = dataPoint.topics
                .map(topic => ({
                    topic,
                    node: nodesById[topic.name]
                }))
                .filter(({topic}) => !!topic)
                .sort((a, b) => topicColorMap[a.topic.name] < topicColorMap[b.topic.name])

            dataPoint.topics = topicsWithNode.map(({topic}) => topic);

            dataPoint.topics.forEach((d, index) => {
                let marker = verticalMarkerContainer
                  .append('g')
                    .classed('circle-container', true)
                      .append('circle')
                        .classed('data-point-highlighter', true)
                        .attr('cx', highlightCircleSize)
                        .attr('cy', 0)
                        .attr('r', highlightCircleRadius)
                        .style('stroke-width', () => (
                            shouldShowAllDataPoints ? highlightCircleStrokeAll : highlightCircleStroke
                        ))
                        .style('stroke', topicColorMap[d.name])
                        .style('cursor', 'pointer')
                        .on('click', function () {
                            addGlowFilter(this);
                            handleHighlightClick(this, d);
                        })
                        .on('mouseout', function () {
                            removeFilter(this);
                        });

                const path = topicsWithNode[index].node;
                const x = xScale(new Date(dataPoint.topics[index].date));
                const y = getPathYFromX(x, path, d.name);

                marker.attr('transform', `translate( ${(-highlightCircleSize)}, ${y} )` );
            });
        }
1172448
function () {
            var suggestionContainer = this._textInputField.parentNode;
            var highlightedArray = [];
            for (var i = 0; i < suggestionContainer.children.length - 1; i++) {
                var suggestionNode = suggestionContainer.children[i];
                var suggestionNodeClassList = new aria.utils.ClassList(suggestionNode);
                if (suggestionNodeClassList.contains("highlight")) {
                    highlightedArray.push(i + 1);
                }
                suggestionNodeClassList.$dispose();
            }
            return highlightedArray;
        }
717056
function (e) {
            // see if we formed a valid word
            for (var i = 0, len = wordList.length; i < len; i++) {
                if (wordList[i] === curWord) {
                    var selected = $('.selected');
                    selected.addClass('found');
                    wordList.splice(i, 1);
                    var color = e.data.colorHash.hex(curWord);
                    $('.' + curWord).addClass('wordFound');
                    for (var selectedIndex = 0, selectedLength = selected.length; selectedIndex < selectedLength; selectedIndex++) {
                        var current = $(selected[selectedIndex]), style = current.attr("style"), hasBC = style != undefined && style.search("background-color") != -1;
                        if (hasBC) {
                            current.css("border", "4px solid " + color);
                        }
                        else {
                            current.css("background-color", color);
                        }
                    }
                    $(e.data.puzzleEl).trigger("found", curWord);
                    $(e.data.wordsEl).append("<li class=\"" + curWord + " wordFound\"><i style=\"background-color:" + color + ";\"></i>" + curWord + "</li>");
                }
                if (wordList.length === 0) {
                    $('.puzzleSquare').off(".spl").addClass('complete');
                    $(e.data.puzzleEl).trigger("end");
                }
            }
            // reset the turn
            $('.selected').removeClass('selected');
            startSquare = null;
            selectedSquares = [];
            curWord = '';
            curOrientation = null;
        }
301820
function handleContent(element, spaces, marker) {
  let renderedContent = '';
  let objectLike = null;

  if (element.content === undefined) {
    return [renderedContent, objectLike];
  }

  for (const item of element.content) {
    // Note: the `initialIndent` option above works because we specifically
    //       do *not* pass it down the rabbit hole here.
    if (item.element === 'member') {
      // This is an object type or something similar.
      objectLike = true;
      /* eslint-disable no-use-before-define */
      renderedContent += handle(item.key.content, item.value, {
        parent: element,
        spaces,
        marker,
        attributesElement: item,
      });
      /* eslint-enable no-use-before-define */
    } else if (item.element === 'ref') {
      renderedContent += `${marker} Include ${item.content.href}\n`;
    } else if (item.element === 'select') {
      // This is a `OneOf` mutually exclusive type. Currently not
      // supported as it needs some support upstream in Minim.
      console.warn('MSON select/option elements are not yet supported!');
    } else {
      // This is an array type or something similar.
      objectLike = false;
      /* eslint-disable no-use-before-define */
      renderedContent += handle(item.title, item, {
        parent: element,
        spaces,
        marker,
      });
      /* eslint-enable no-use-before-define */
    }
  }

  return [renderedContent, objectLike];
}