Actually highlight the block
513992
def highlightBlock(self, text):
        
        # Note that an undefined blockstate is equal to -1, so the first block
        # will have the correct behaviour of starting at 0.
        if self._allow_highlight:
            start = self.previousBlockState() + 1
            end = start + len(text)
            for i, (fmt, letter) in enumerate(self._charlist[start:end]):
                self.setFormat(i, 1, fmt)
            self.setCurrentBlockState(end)
            self.highlight_spaces(text)
1127753
function () {
    if (player.playing) player.pause()
    else player.play()
    if (player.playing) {
      clickToPlay.style.display = 'none'
    } else {
      clickToPlay.textContent = 'Paused'
      clickToPlay.style.display = 'block'
    }
  }
1268389
public void highlight() {
		final JTabbedPane parent = (JTabbedPane) this.getUiComponent().getParent();

		//search through tabs until we find this one
		for (int i = 0; i < parent.getTabCount(); i++) {
			String title = parent.getTitleAt(i);

			if (getTabCaption().equals(title)) {  //found this tab
				//create new colored label and set it into the tab
				final JLabel label = new JLabel(getTabCaption());
				label.setForeground(new Color(0xff6633));
				parent.setTabComponentAt(i, label);

				//schedule a task to change back to original color
				Timer timer = new Timer();

				TimerTask task = new TimerTask() {
					@Override
					public void run() {
						label.setForeground(Color.black);
					}
				};

				timer.schedule(task, 3000);

				break;
			}
		}
	}
1186274
public void highlightElement() {

        if (m_highlighting == null) {
            m_highlighting = new CmsHighlightingBorder(m_position, CmsHighlightingBorder.BorderColor.red);
            RootPanel.get().add(m_highlighting);
        } else {
            m_highlighting.setPosition(CmsPositionBean.getBoundingClientRect(getElement()));
        }
    }
384375
def highlightBlock(self, text):
        
        text = nativestring(text)
        for pattern, format in self.patterns():
            for result in re.finditer(pattern, text):
                grps = result.groups()
                if grps:
                    for i in range(len(grps)):
                        start, end = result.span(i+1)
                        self.setFormat(start, end - start, format)
                else:
                    self.setFormat(result.start(),
                                   result.end() - result.start(),
                                   format)
        
        self.setCurrentBlockState(0)
        if self.previousBlockState() == 1:
            return
        
        for form, open, close in self._multiline:
            open = QtCore.QRegExp(open)
            close = QtCore.QRegExp(close)
            
            start = open.indexIn(text)
            processed = False
            
            while start >= 0:
                processed = True
                end = close.indexIn(text, start)

                if end == -1:
                    self.setCurrentBlockState(1)
                    length = len(text) - start
                else:
                    length = end - start + close.matchedLength()

                self.setFormat(start, length, form)
                start = open.indexIn(text, start + length)
            
            if processed:
                break
1161632
def highlight(mark = PASS)
      case mark
      when PASS; rainbowify PASS_ARY[@color_index%2]
      when FAIL; "\e[31m#{mark}\e[0m"
      when ERROR; "\e[33m#{mark}\e[0m"
      when PENDING; "\e[33m#{mark}\e[0m"
      else mark
      end
    end
990737
def highlight_at!(y, x)
      update_highlighter if @highlighter_tokens.nil?

      fail(HighlighterUnknownSegment, "line: #{y}") if @highlighter_tokens[@offset_y + y].nil?
      fail(HighlighterUnknownSegment, "line: #{y} char: #{x}") if @highlighter_tokens[@offset_y + y][x].nil?

      @highlighter_tokens[@offset_y + y][x]
    end
182626
private void renderBlock(BlockNode block, Appendable to) {
    pushOutputBuf(to);
    visitChildren(block);
    popOutputBuf();
  }
346172
def highlight_block(self, text):
        """"""
        text = to_text_string(text)
        inside_comment = tbh.get_state(self.currentBlock().previous()) == self.INSIDE_COMMENT
        self.setFormat(0, len(text),
                       self.formats["comment" if inside_comment else "normal"])
        
        match = self.PROG.search(text)
        index = 0
        while match:
            for key, value in list(match.groupdict().items()):
                if value:
                    start, end = match.span(key)
                    index += end-start
                    if key == "comment_start":
                        inside_comment = True
                        self.setFormat(start, len(text)-start,
                                       self.formats["comment"])
                    elif key == "comment_end":
                        inside_comment = False
                        self.setFormat(start, end-start,
                                       self.formats["comment"])
                    elif inside_comment:
                        self.setFormat(start, end-start,
                                       self.formats["comment"])
                    elif key == "define":
                        self.setFormat(start, end-start,
                                       self.formats["number"])
                    else:
                        self.setFormat(start, end-start, self.formats[key])
                    
            match = self.PROG.search(text, match.end())
        
        self.highlight_spaces(text)
        
        last_state = self.INSIDE_COMMENT if inside_comment else self.NORMAL
        tbh.set_state(self.currentBlock(), last_state)
441334
function() {
    this.setHelpUrl(Blockly.Msg.TEXT_TEXT_HELPURL);
    this.setColour(Blockly.Blocks.texts.HUE);
    this.appendDummyInput()
        .appendField(this.newQuote_(true))
        .appendField(new Blockly.FieldTextInput(''), 'TEXT')
        .appendField(this.newQuote_(false));
    this.setOutput(true, 'String');
    // Assign 'this' to a variable for use in the tooltip closure below.
    var thisBlock = this;
    // Text block is trivial.  Use tooltip of parent block if it exists.
    this.setTooltip(function() {
      var parent = thisBlock.getParent();
      return (parent && parent.tooltip) || Blockly.Msg.TEXT_TEXT_TOOLTIP;
    });
  }
638436
def highlight!(group, attributes={})
      highlight(group, attributes.dup.tap { |hash| hash[:force] = true })
    end
1076166
def highlight_current_line(editor):
    

    format = editor.language.theme.get("accelerator.line")
    if not format:
        return False

    extra_selections = editor.extraSelections() or []
    if not editor.isReadOnly():
        selection = QTextEdit.ExtraSelection()
        selection.format.setBackground(format.background())
        selection.format.setProperty(QTextFormat.FullWidthSelection, True)
        selection.cursor = editor.textCursor()
        selection.cursor.clearSelection()
        extra_selections.append(selection)
    editor.setExtraSelections(extra_selections)
    return True
820968
def highlightBlock(self, text):
        

        # I need to know where in the document we are,
        # because our formatting info is global to
        # the document
        cb = self.currentBlock()
        p = cb.position()

        # The \n is not really needed, but sometimes
        # you are in an empty last block, so your position is
        # **after** the end of the document.
        text = str(self.document().toPlainText()) + '\n'

        # Yes, re-highlight the whole document.
        # There **must** be some optimizacion possibilities
        # but it seems fast enough.
        highlight(text, self.lexer, self.formatter)

        # Just apply the formatting to this block.
        # For titles, it may be necessary to backtrack
        # and format a couple of blocks **earlier**.
        for i in range(len(str(text))):
            try:
                self.setFormat(i, 1, self.formatter.data[p + i])
            except IndexError:
                pass

        # I may need to do something about this being called
        # too quickly.
        self.tstamp = time.time()
951382
function(block){
    if (this.pp) this.buf.push("pug_indent.push('" + Array(this.indents + 1).join(this.pp) + "');");
    this.buf.push('block && block();');
    if (this.pp) this.buf.push("pug_indent.pop();");
  }
1190518
def highlight_channels(self, l, selected_chan):
        
        for row in range(l.count()):
            item = l.item(row)
            if item.text() in selected_chan:
                item.setSelected(True)
            else:
                item.setSelected(False)
891215
def highlight_current_cell(self):
        """"""
        if self.cell_separators is None or \
          not self.highlight_current_cell_enabled:
            return
        cursor, whole_file_selected, whole_screen_selected =\
            self.select_current_cell_in_visible_portion()
        selection = TextDecoration(cursor)
        selection.format.setProperty(QTextFormat.FullWidthSelection,
                                     to_qvariant(True))
        selection.format.setBackground(self.currentcell_color)

        if whole_file_selected:
            self.clear_extra_selections('current_cell')
        elif whole_screen_selected:
            if self.has_cell_separators:
                self.set_extra_selections('current_cell', [selection])
                self.update_extra_selections()
            else:
                self.clear_extra_selections('current_cell')
        else:
            self.set_extra_selections('current_cell', [selection])
            self.update_extra_selections()
1105022
function(block) {
  switch(block.t) {
    case 'Paragraph':
    case 'SetextHeader':
    case 'ATXHeader':
      block.inline_content =
        this.inlineParser.parse(block.string_content.trim(), this.refmap);
      block.string_content = "";
      break;
    default:
      break;
  }

  if (block.children) {
    for (var i = 0; i < block.children.length; i++) {
      this.processInlines(block.children[i]);
    }
  }

}