Skip to content

Wrong line count for the language Elm (and maybe other languages too) when encounter certain characters #568

@lucamug

Description

@lucamug

The following line of Elm code make the counter to stop the count:

    Html.node "style" [] [ Html.text "div[role=button] {-webkit-tap-highlight-color: transparent}" ]

For example, this file 4 lines of code are reported correctly:

module Main exposing (main)

import Html


main =
    Html.node "style" [] [ Html.text "div[role=button] {-webkit-tap-highlight-color: transparent}" ]

But for this file, still 4 lines of code are reported, wrongly.

module Main exposing (main)

import Html


main =
    Html.node "style" [] [ Html.text "div[role=button] {-webkit-tap-highlight-color: transparent}" ]


a =
    3

The culprit seems being {-}, or a similar string where the dash can be followed by any character, like {-xxx}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions