Syntax highlighting doesn't work if a non-breaking space follow a keyword in comments. However, it works well if a non-breaking space is before a keyword. Same behaviour in code. May be this is intentional for code, but in comments with keywords like TODO, FIXME and so on, I find this behaviour annoying. Tested with Perl, Bash, Python and C. To see sample cases in Perl, try this: #! /usr/bin/perl # # highlighted: #TODO #[normal space]TODO #[normal space]TODO[normal space] #[non breaking space here]TODO #[non breaking space here]TODO[normal space] # # not highlighted: #TODO[non breaking space here] #[normal space]TODO[non breaking space here]
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/372
Git commit 8fe3d8facf503f3bade421da6522c4b671980ba2 by Christoph Cullmann, on behalf of Jonathan Poelen. Committed on 17/10/2022 at 17:11. Pushed by cullmann into branch 'master'. Alerts: add NO-BREAK SPACE (nbsp) as keyword deliminator M +3 -0 autotests/folding/test-alerts.fold M +3 -0 autotests/html/test-alerts.dark.html M +3 -0 autotests/html/test-alerts.html M +3 -0 autotests/input/test-alerts M +3 -0 autotests/reference/test-alerts.ref M +3 -2 data/syntax/alert.xml https://invent.kde.org/frameworks/syntax-highlighting/commit/8fe3d8facf503f3bade421da6522c4b671980ba2
thanks !