---------------------------------------------------
| 246 | |
| 247 | // --------------------------------------------------- |
| 248 | void SyntaxHighlighter::highlightBlock(const QString& text) { |
| 249 | |
| 250 | |
| 251 | foreach (const HighlightingRule &rule, highlightingRules) { |
| 252 | QRegExp expression(rule.pattern); |
| 253 | int index = expression.indexIn(text); |
| 254 | while (index >= 0) { |
| 255 | int length = expression.matchedLength(); |
| 256 | setFormat(index, length, rule.format); |
| 257 | index = expression.indexIn(text, index + length); |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | } |
nothing calls this directly
no outgoing calls
no test coverage detected