From e9c6de2700aa804cadb5990790b8f18315ddd2e2 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sat, 31 Jan 2015 13:08:08 +0100 Subject: [PATCH] minor TODO detection improvement --- cetodo/cetodo.d | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cetodo/cetodo.d b/cetodo/cetodo.d index 269c34e2..6f1de5ee 100644 --- a/cetodo/cetodo.d +++ b/cetodo/cetodo.d @@ -161,11 +161,13 @@ void main(string[] args) // "TODO" while (true) { if (pos == text.length) break; - auto upIdent = identifier.strip.toUpper; - if (upIdent == "TODO" || upIdent == "FIXME"){ - isTodoComment = true; - text = text[pos..$]; - break; + if (identifier.length > 3) { + auto upIdent = identifier.strip.toUpper; + if (upIdent == "TODO" || upIdent == "FIXME"){ + isTodoComment = true; + text = text[pos..$]; + break; + } } identifier ~= text[pos++]; }