mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-19 10:20:17 -06:00
Don't syntax highlight table names in the middle of other identifiers
Assuming you have a table names 't', the syntax highlighter would have highlighted all ts in column names and other identifiers which aren't highlighted otherwise. This is fixed by this commit.
This commit is contained in:
@@ -101,7 +101,7 @@ void SQLiteSyntaxHighlighter::setTableNames(const QStringList &tablenames)
|
||||
tableNameRules.clear();
|
||||
foreach(const QString& tblname, tablenames) {
|
||||
HighlightingRule rule;
|
||||
rule.pattern = QRegExp(tblname);
|
||||
rule.pattern = QRegExp(QString("\\b%1\\b").arg(tblname));
|
||||
rule.format = tableFormat;
|
||||
tableNameRules.append(rule);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user