minor TODO detection improvement

This commit is contained in:
Basile Burg 2015-01-31 13:08:08 +01:00
parent c9bebfd262
commit e9c6de2700
1 changed files with 7 additions and 5 deletions

View File

@ -161,12 +161,14 @@ void main(string[] args)
// "TODO" // "TODO"
while (true) { while (true) {
if (pos == text.length) break; if (pos == text.length) break;
if (identifier.length > 3) {
auto upIdent = identifier.strip.toUpper; auto upIdent = identifier.strip.toUpper;
if (upIdent == "TODO" || upIdent == "FIXME"){ if (upIdent == "TODO" || upIdent == "FIXME"){
isTodoComment = true; isTodoComment = true;
text = text[pos..$]; text = text[pos..$];
break; break;
} }
}
identifier ~= text[pos++]; identifier ~= text[pos++];
} }
if (!isTodoComment) return; if (!isTodoComment) return;