The source project of this merge request has been removed.
Recognise function names when followed by punctuation
UNTESTED
The regex for applying code formatting to function names was restricted in commit 7a586a33 (Restrict the function escape regular expression, 2021-09-27) to only recognise function-name-followed-by-parentheses when surrounded by whitespace, citing "too many cases in which we end up messing it up".
This misses many legitimate cases, for example when there is a function name at the end of a sentence (so it is followed by "." rather than a space).
This commit relaxes the regex to permit certain trailing punctuation marks. I had a quick look and did not spot any false positives.
/cc @ebassi
Edited by Tom Levy