 Specifically, it looks like function annotations in Python 3 mess it up. The first docstring should be highlighted like the second. This is with VSCode. For tokenizing VSCode uses the tokenizer from https://github.com/textmate/python.tmbundle/blob/master/Syntaxes/Python.tmLanguage