I tested both SublimeText 2 and 3, and both of them are wrong:
If you check this code, you will see all the code immediately after : syntax is not correctly allocated.
def foo(a, b) -> str:
I found some links explaining how to add my own syntax highlighting rules, but I did not find how to change the ones that were already implemented to fix them.
EDIT: Now, knowing where to change the default syntax highlighting rules thanks to MattDMo, I tried to change line 385 of my file
<key>end</key> <string>(\))\s*(?:(\:)|(.*$\n?))</string>
to
<key>end</key> <string>(\))\s*(?:\->\s*[A-Za-z_][A-Za-z0-9_]*\s*)?(?:(\:)|(.*$\n?))</string>
But that did not work.
JeromeJ
source share