Skip to content

Commit bf58bbb

Browse files
author
Joachim Meyer
committed
Fixes: #232
1 parent 8c56813 commit bf58bbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

IDE/Contents/Source/PolycodeTextEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ std::vector<SyntaxHighlightToken> PolycodeSyntaxHighlighter::parseLua(String tex
371371
tokens.push_back(SyntaxHighlightToken(line, type));
372372
tokens.push_back(SyntaxHighlightToken(ch, ch_type));
373373

374-
if(ch == '-' && lastSeparator == '-' && mode != MODE_STRING) {
374+
if(ch == '-' && lastSeparator == '-' && text[i-1] == lastSeparator && mode != MODE_STRING) {
375375
isComment = true;
376376
tokens[tokens.size()-1].type = MODE_COMMENT;
377377
tokens[tokens.size()-2].type = MODE_COMMENT;

0 commit comments

Comments
 (0)