Skip to content

Problems with {{ }} below {% %} #28

Open

Description

@tfeldmann

As you can see in the screenshot the first pair of braces is highlighted, but all braces below {% %} aren't:

bildschirmfoto 2015-11-10 um 16 45 38

Activity

  1. vpetrovykh commented on Nov 10, 2015

    @vpetrovykh
    Contributor

    Currently this is by design. The issue is that there is no way of telling whether {{ and }} are meant to be used with {}-format string or something else. Since double braces have special meaning in {}-format strings they are highlighted.

    Starting from the point where we see {%...%}, we can tell that this string is highly unlikely to be a {}-format string or a %-format string. However, anything preceding this will be highlighted normally, that is to say that the potential formatting symbols are shown.

    We do have some plans for configurable options for string highlighting, where you could disable the highlighting for formats that you personally don't need. So stay tuned.

    In the interim, if this highlighting bothers you, you can actually tweak the color schema to hide this from you by making special characters inside strings the same color as the string.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions