CodeEditor: Added NOTE as special comment keyword. (#239)

This commit is contained in:
Zbigniew Rębacz 2025-03-23 08:16:30 +01:00 committed by GitHub
parent 0f3f3dfb98
commit 6ea2db586f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -126,9 +126,8 @@ const wchar *CSyntax::DoComment(HighlightOutput& hls, const wchar *p, const wcha
for(const wchar *s = p; s < e && !IsLetter(*s); s++)
n++;
hls.SetFlags(n, flags);
static WString todo = "TODO";
static WString fixme = "FIXME";
if(w.GetCount() >= 4 && w.GetCount() <= 5 && findarg(w, todo, fixme) >= 0)
static const Index<WString> key_words = {"TODO", "NOTE", "FIXME"};
if(w.GetCount() >= 4 && w.GetCount() <= 5 && key_words.Find(w) >= 0)
hls.Put(n, hl_style[INK_COMMENT_WORD], hl_style[PAPER_COMMENT_WORD]);
else
hls.Put(n, hl_style[INK_COMMENT]);