Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add f-string support#1

Merged
ptweir merged 1 commit into
ptweir:masterptweir/python-string-sql:masterfrom
feluxe:masterfeluxe/python-string-sql:masterCopy head branch name to clipboard
Jun 3, 2019
Merged

Add f-string support#1
ptweir merged 1 commit into
ptweir:masterptweir/python-string-sql:masterfrom
feluxe:masterfeluxe/python-string-sql:masterCopy head branch name to clipboard

Conversation

@feluxe

@feluxe feluxe commented Jun 3, 2019

Copy link
Copy Markdown

This adds 'basic' support for f-strings.

With this commit python-string-sql will be able to highlight the following code :

mytable = "table123"

query = f"""--sql
    SELECT * from {mytable};
"""

Cheers! :-)

PS: I just noticed that there is a little indentation mismatch. I think it was a mix of 4 space and 2 space before. My auto-formatter changed it to 2 space only. The only line that really changed is line 5.

@ptweir ptweir merged commit 387b0e5 into ptweir:master Jun 3, 2019
@ptweir

ptweir commented Jun 3, 2019

Copy link
Copy Markdown
Owner

Thanks for the pull request! In testing it I noticed that I think it would be best to all zero or more spaces before the "begin" and "end" patterns. I'll update that then bump the version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.