Nested parentheses in email (header) syntax highlighting are not detected. Namely, gray is used only from the first opening to the first closing parentheses instead of from the outer opening and closing parentheses. (In email headers, parentheses indicate a comment. These comments can contain parenthetical material as well, leading to nested parentheses.) A real-life example header where this issue shows: --- Received: from redacted.outbound.protection.example.com (mail-redacted.outbound.protection.example.com [0.0.0.0]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx2.example.org (Postfix) with ESMTPS for <someone@example.org>; Thu, 13 Aug 2020 06:35:02 -0400 (EDT) --- The last closing parenthesis on line three of the example is black instead of gray. (Beware Bug 398717.)
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/153
Git commit 90626bde463eca70a448579c7d6493546263152e by Martin Walch. Committed on 17/01/2021 at 22:07. Pushed by cullmann into branch 'master'. email.xml: Detect nested comments and escaped characters Conform to RFC 822 and 5322: - Add support for nested comments. - Add support for escaped characters in comments. - Extend support for escaped characters in quoted strings. - Extend and update test cases accordingly. FIXED-IN: 5.79.0 M +4 -0 autotests/folding/test.eml.fold M +4 -0 autotests/html/test.eml.dark.html M +4 -0 autotests/html/test.eml.html M +4 -0 autotests/input/test.eml M +4 -0 autotests/reference/test.eml.ref M +9 -2 data/syntax/email.xml https://invent.kde.org/frameworks/syntax-highlighting/commit/90626bde463eca70a448579c7d6493546263152e