Submodule: syntax

class flika.app.syntax.PythonHighlighter(document)

Syntax highlighter for the Python language.

highlightBlock(text)

Apply syntax highlighting to the given block of text.

match_multiline(text, delimiter, in_state, style)

Do highlighting of multi-line strings. delimiter should be a QtCore.QRegExp for triple-single-quotes or triple-double-quotes, and in_state should be a unique integer to represent the corresponding state changes when inside those strings. Returns True if we’re still inside a multi-line string when this function is finished.

flika.app.syntax.format(color, style='')

Return a QtGui.QTextCharFormat with the given attributes.