inline_sql_syntax
inline_sql_syntax copied to clipboard
Support Python f-string
It's impossible to parse Python f-strings for the moment:
✅
❌
It would be very practical to add this possibility 🙏
Added syntax highlighting for multi-line f-strings in 2.14
Sorry, but I don't understand how it works. I tried with your Python example but got this result:
So, I conclude that doesn't work.
You explain here never to do that. Ok, this is not a good practice. But should we understand that it is impossible with your lib ?
Thanks for explanations
But should we understand that it is impossible with your lib ?
No, it's not my place to "punish" people for something that might be unsafe. And there is no indication of unsanitized input here. The last two strings in your screenshot work for me. Not sure yet why they don't work for you.
I also prematurely closed it without adding support for single-line f-strings) Will add later.
The only string that does not work by design (so far) is this one:
multiline_without_marker = f"""
SELECT * FROM {table_name};
"""
I've open separate issue for queries like this one: #78. Thanks for your input.
With your last version it's good !
Before update:
I also prematurely closed it without adding support for single-line f-strings) Will add later.
As far as I can tell, single-line f-strings are still not supported :(