4 ms·
How Does Git Know What a Python Function/Class Definition Looks Like?
- simonw 6y agoI really like the "TIL" format. I tweeted this a few weeks ago and it seemed to have really resonated with people.
- im3w1l 6y agoSo uhm, what happens if someone puts class Datasette: in a multiline string?
- coldtea 6y agoThe regex has a clause to cover that case?
- im3w1l 6y agoIt doesn't. And I finally took the time to test it; git does the wrong thing. Idk if it's display only (in which case I guess a 99.99% solution is fine), or if it's actually used somehow say when applying a patch, in which case it may lead to security issues.
- doublesCs 6y agoVery thin content. There were really only two options: regex or parser. This is close to "You won't believe what happened next" level of content.