Skip to content

Commit a4f44d8

Browse files
authored
Fix multiple commented out lines not being ignored (sqlitebrowser#811)
This was supposed to be fixed by 842aec8, but it wasn't. It now removes everything that starts with two consecutive dashes, up until the end of the respective line.
1 parent 90f98f3 commit a4f44d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sqlitetablemodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ void SqliteTableModel::setQuery(const QString& sQuery, bool dontClearHeaders)
102102

103103
m_sQuery = sQuery.trimmed();
104104

105-
m_sQuery.remove(QRegExp("(?=\\s*[-]{2})[^'\"\n]*($|\\n)"));
105+
m_sQuery.remove(QRegExp("\\s*--[^\\n]+"));
106106

107107
// do a count query to get the full row count in a fast manner
108108
m_rowCount = getQueryRowCount();

0 commit comments

Comments
 (0)