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. * [1] Python. PEP 257 -- Docstring Conventions: https://www.python.org/dev/peps/pep-0257/ * [2] Python docstrings: http://www.pythonforbeginners.com/basics/python-docstrings 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
parent
44bc7c60
Please register or sign in to comment