
How Does Git Know What a Python Function/Class Definition Looks Like? - gilad
https://mobile.twitter.com/simonw/status/1270359803957612545
======
simonw
I really like the "TIL" format. I tweeted this a few weeks ago and it seemed
to have really resonated with people.

------
doublesCs
Very 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.

------
im3w1l
So uhm, what happens if someone puts class Datasette: in a multiline string?

~~~
coldtea
The regex has a clause to cover that case?

~~~
im3w1l
It 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.

