class_docstr: Syntax highlighter for the Python language.
      
docstr: Apply syntax highlighting to the given block of text.
          
docstr_tok: ["Apply","syntax","highlighting","to","the","given","block","of","text","."]
code: def highlightBlock(self, text):
      """Apply syntax highlighting to the given block of text."""
      # Do other syntax formatting
      for expression, nth, format in self.rules:
          index = expression.indexIn(text, 0)
  
          while index >= 0:
              # We actually want the index of the nth match
              index = expression.pos(nth)
              length = len(expression.cap(nth))
              self.setFormat(index, length, format)
              index = expression.indexIn(text, index + length)
  
      self.setCurrentBlockState(0)
  
      # Do multi-line strings
      in_multiline = self.match_multiline(text, *self.tri_single)
      if not in_multiline:
          in_multiline = self.match_multiline(text, *self.tri_double)
  
file_path: PandasGUI/pandasgui/widgets/python_highlighter.py
imports: from PyQt5 import QtWidgets
  from PyQt5.QtCore import QRegExp
  from PyQt5.QtGui import QColor, QTextCharFormat, QFont, QSyntaxHighlighter
label_desc: Use image node_id 2 for calling the PythonHighlighter obj's underlying member method code with example usage: obj.highlightBlock(text) without return types