Skip to content
Commit 2627d3e4 authored by Nibaldo González's avatar Nibaldo González Committed by Dominik Haumann
Browse files

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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment