From: Yilei "Dolee" Yang Date: Sun, 22 Jan 2023 13:27:11 +0000 (-0800) Subject: Fix an invalid quote escaping bug in f-string expressions (#3509) X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/a36878eb2f375e2ac1e13052f663909f3835ec46?ds=sidebyside;hp=a36878eb2f375e2ac1e13052f663909f3835ec46 Fix an invalid quote escaping bug in f-string expressions (#3509) Fixes #3506 We can't simply escape the quotes in a naked f-string when merging string groups, because backslashes are invalid. The quotes in f-string expressions should be toggled (this is safe since quotes can't be reused). This fix also means implicitly concatenated f-strings with different quotes can now be merged or quote-normalized by changing the quotes used in expressions. e.g.: ```diff raise sa_exc.UnboundExecutionError( "Could not locate a bind configured on " - f'{", ".join(context)} or this Session.' + f"{', '.join(context)} or this Session." ) ``` ---