cgag / loc

Count lines of code quickly.
MIT License
2.29k stars 126 forks source link

Fix multiline comments for python #117

Open kuba-- opened 5 years ago

kuba-- commented 5 years ago

This PR fixes multiline comments for python (and for languages where begin and end strings are the same). It does not fix #111 because python uses the same characters as comments for multiline strings (""", '''), but at least it fixes following cases:

'''
This is a module docstring
'''
a = 1
b = 2
c = 3
"""
This is a module docstring
"""