Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{{ in f-string breaks highlighting #239

Closed
verhovsky opened this issue Sep 19, 2021 · 2 comments
Closed

{{ in f-string breaks highlighting #239

verhovsky opened this issue Sep 19, 2021 · 2 comments

Comments

@verhovsky
Copy link

verhovsky commented Sep 19, 2021

I don't know if the {{ is what does it, but that's what I suspect. {{ is how you escape a "{" so that your string can contain a literal "{".

  • Editor name and version: Github
  • Platform: Web
  • Color scheme: Github default color scheme
  • MagicPython version: 2802ded
  • A sreenshot:

Screen Shot 2021-09-19 at 11 26 04 AM

  • 5-10 lines of surrounding code:
def format_as_js(d, var_name, indent=0, indent_type='\t'):
    yield f"{indent_type * indent}var {var_name} = {{"
    for top_key, opt in d.items():
        def quote(key):
            return key if key.isalpha() else repr(key)

rest of the code is here: https://github.com/verhovsky/curlconverter/blob/869c6d0229a9004bdca8e44d1ef3c3227e785093/extract_curl_args.py#L201

@verhovsky
Copy link
Author

I see now (#225) that MagicPython is not the place to report highlighting issues on github.

@verhovsky
Copy link
Author

verhovsky commented Sep 19, 2021

I was told this is in fact the right place for this issue. github-linguist/linguist#5572 (comment)

Edit: nvm github-linguist/linguist#5572 (comment)

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

No branches or pull requests

1 participant