When using the Javascript scripting API from Kate, you can test whether a part of the document is part of the code (and not, say, comments) using the function isCode(). However, when comments contain alert words such as FIXME, TODO or NOTE (defined in data/syntax/alert.xml), the alert words are TRUE for isCode() and comments are thus not appropriately ignored. I believe this a bug as I don't see languages or contexts where such alert words would not be contained in comments and be actually part of the code. I thus believe the correct behaviour should be to return FALSE for isCode() for those alert words.
Git commit af5ebba716f53f11d0f3b9466f9c32e416a68fc5 by Dominik Haumann. Committed on 09/09/2018 at 10:36. Pushed by dhaumann into branch 'master'. Scripting: isCode() returns false for dsAlert text Summary: BUG: 398393 Test Plan: make && make test Reviewers: cullmann Reviewed By: cullmann Subscribers: kwrite-devel, kde-frameworks-devel Tags: #kate, #frameworks Differential Revision: https://phabricator.kde.org/D15370 M +1 -0 src/script/katescriptdocument.cpp https://commits.kde.org/ktexteditor/af5ebba716f53f11d0f3b9466f9c32e416a68fc5