language-python icon indicating copy to clipboard operation
language-python copied to clipboard

Highlight docstrings as reStructuredText

Open remcohaszing opened this issue 9 years ago • 0 comments

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'

remcohaszing avatar Jul 14 '16 12:07 remcohaszing