Docstring in Python files uses string face as the default one. I think it is bad idea. When you have both strings and docstrings on the display they blends together.
Example:

After potential change to comment.

As you might know the other main use case of triple quotes is to define strings than can contain newlines:
my_long_string = """This is a multi-line string,
where this is the second line
then you can even have indented lines like this one.
"""
print(my_long_string)
print("""Another one with a newline at the end.
""")
Is there a reliable and robust way to detect whether a triple-quoted string is a docstring or a regular string? Vim also seems to not make this distinction. This change would be good for docstrings as long as we can reliably detect which one it is.
I advised that change in the PR that introduces the documentation face.
Triple strings could be highlighted as documentation if they are not assigned to a variable, e.g. ^\h*"{3}\b.
I was trying to fix this. However, I do not understand what is the meaning of (?<!\\)(?:\\\\)* within
add-highlighter shared/python/docstring region -match-capture ("""|''') (?<!\\)(?:\\\\)*("""|''') regions
This bit makes sure that the closing quote is not escaped.
Most helpful comment
I advised that change in the PR that introduces the
documentationface.Triple strings could be highlighted as
documentationif they are not assigned to a variable, e.g.^\h*"{3}\b.