language-python
language-python copied to clipboard
Highlight docstrings as reStructuredText
Since I noticed this plugin tries to detect SQL from strings in order to highlight them, I figured it might just as well highlight docstrings as reStructuredText. Also there is no need to detect if any docstrings could be highlighted as SQL.
This would affect:
- function docstrings
- class docstrings
- module docstrings
- sphinx property comments
"""
Module docstring.
"""
class A:
"""
Class docstring
"""
#: Property comment
prop = 'prop'
def __init__(self):
"""
Function docstring
"""
#: Property comment
self.prop = 'prop'
def a():
"""
Function docstring
"""
#: Property comment
prop = 'prop'