super(parent);
}
@Override
protected void highlightBlock(String text) {
QTextCharFormat format = new QTextCharFormat();
QBrush brush = new QBrush(QColor.blue, Qt.BrushStyle.SolidPattern);
format.setForeground(brush);
format.setFontWeight(QFont.Weight.Bold.value());
int index = text.indexOf("<");
while (index >= 0) {
int length = text.indexOf(">", index)-index+1;
setFormat(index, length, format);