Closed JohnAD closed 3 years ago
I've added the flawed char tests back as separate rules. The check is not nearly as inclusive since there is no longer the expectation that all uses of apostrophe always have a match. Instead it is more specifically looking for sequences of letters and digits without whitespace or non-escape punctuation that are incorrect. All proper escapes such as
let x = `\``
are accounted for and marked as a proper char.
While not stepping on anything like:
let y = 23'zing.bar('\e')
I don't know of any problem cases.
But, generically, the invalid.illegal.character.nim
"Error highlighting" that was fairly inclusive before only does single line analysis and is a bit more limited. I'm not convinced getting back to that is ideal; but perhaps I need to live with the changes longer.
ping @Araq now that PRs + issues were successfully transfered to https://github.com/nim-lang/NimLime
(btw that's the version that currently runs on github, see https://github.com/github/linguist/pull/5306)
also, could i please get sufficient rights to edit labels?
The next release of Nim is supporting numeric suffixes. For example:
Because the single quote now has dual purposes the current NimLime highlighter gets confused.
This PR will do two things:
As you can see, GitHub is also confused by this. This makes sense since I believe GitHub's filters are based on NimLimes'.
I've marked this as work-in-progress (WIP) because item 2 is not done yet. I'm still wrapping my head around a good way to do it. At the moment, the
invalid.illegal.character.nim
checker is completely disabled. I'd like to carefully add that back in. I might do it as a separate rule rather than as a pattern underneath the current one.Any and all help is very welcome!