WordDetect rule: detect delimiters at the inner edge of the string

Authored by nibags on Oct 3 2019, 6:47 AM.

Description

WordDetect rule: detect delimiters at the inner edge of the string

Summary:
In WordDetect rules, verify delimiter characters also on the right and left edges inside the string.

For example:

<WordDetect attribute="Keyword" String="<hello"/>

In the past, this rule was equivalent to \b<hello\b in regular expression. Now, it's equivalent to <hello\b, since < is a delimiter character.

I have checked the WordDetect rules in all definitions and and I haven't seen regressions. In the definitions elm.xml, selinux-cil.xml and selinux-fc.xml I replaced some WordDetect rules with StringDetect, since in this change they are equivalent.

Test Plan: make test

Reviewers: Framework: Syntax Highlighting, dhaumann, cullmann, vkrause, jpoelen

Reviewed By: Framework: Syntax Highlighting, cullmann

Subscribers: kwrite-devel, kde-frameworks-devel

Tags: Kate, Frameworks

Differential Revision: https://phabricator.kde.org/D24378