Fix line type 0 format regular expression

Sat, 08 Apr 2023 12:53:15 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Sat, 08 Apr 2023 12:53:15 +0300
changeset 342
9fd7dcab6d76
parent 341
71c8cea3c205
child 343
4a82990affd5

Fix line type 0 format regular expression

src/ldrawsyntaxhighlighter.cpp file | annotate | diff | comparison | revisions
--- a/src/ldrawsyntaxhighlighter.cpp	Sat Apr 08 12:24:04 2023 +0300
+++ b/src/ldrawsyntaxhighlighter.cpp	Sat Apr 08 12:53:15 2023 +0300
@@ -29,7 +29,7 @@
 	this->bfcPattern = QRegularExpression{QStringLiteral(
 		R"(^\s*(0) (BFC (?:CERTIFY CCW|CERTIFY CW|NOCERTIFY|INVERTNEXT|CLIP|NOCLIP))\s*$)"
 	)};
-	this->commentPattern = QRegularExpression{R"(^\s*(0)\s+(.+)$)"};
+	this->commentPattern = QRegularExpression{R"(^\s*(0)(\s+.*)?$)"};
 }
 
 void LDrawSyntaxHighlighter::highlightBlock(const QString& text)

mercurial