Python: fix escapes in quoted-comments

Authored by nibags on Jul 14 2018, 11:11 AM.

Description

Python: fix escapes in quoted-comments

Summary:
BUG: 386685

Escape characters are not detected in triple-quote comments.
Comments in quotes are literal strings that do not have assignment or operations, so the interpreter ignores them. These are also used to associate documentation with objects, using the __doc__ attribute (Docstrings [1][2]).

Comments in quotes support the same escapes as normal string. Also, since these can be used as documentation strings, I believe that the correct way is to use the same string escape highlight.

Reviewers: Framework: Syntax Highlighting, Kate, dhaumann, cullmann

Reviewed By: Framework: Syntax Highlighting, Kate, dhaumann

Subscribers: ngraham, kwrite-devel, kde-frameworks-devel

Tags: Kate, Frameworks

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