Skip to content

Fix syntax highlighting for case #179

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

basile-henry
Copy link

The keyword case wouldn't get highlighted properly when there was any non-whitespace character on the same line before it.

Often elm-format puts case on a new line, but not always, for example:

view x =
    div
        []
        (case x of
            [] ->
                text "foo"

            _ ->
                text "bar"
        )

Note: This PR might have some other effects on features I am not familiar with. The modified line is in a block of vim script with a comment saying "Folding". It is possible my changes affect folding as well, and I am not entirely sure how to test that.

The keyword `case` wouldn't get highlighted properly when there was any non-whitespace character on the same line before it.

Often `elm-format` puts `case` on a new line, but not always, for example:

```
view x =
    div
        []
        (case x of
            [] ->
                text "foo"

            _ ->
                text "bar"
        )
```
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.

1 participant