Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Numbers at end of strings aren't highlighted as part of the string #30

Closed
caged opened this issue Nov 18, 2015 · 8 comments
Closed

Numbers at end of strings aren't highlighted as part of the string #30

caged opened this issue Nov 18, 2015 · 8 comments
Labels

Comments

@caged
Copy link
Contributor

caged commented Nov 18, 2015

I updated to 1.21 and noticed this started to happen. The digits at the end of the string should be the same color as the string.

screen shot 2015-11-18 at 10 57 17 am

language-sql
├── 0.19.0
├── https://github.com/atom/language-sql
├── SQL language support in Atom
├── 120180 downloads
└── 29 stars
@caged caged added the bug label Nov 18, 2015
@DavidLGoldberg
Copy link

Yeah, this is definitely new in 1.21. I'm writing a semantic highlighting package, but utilizing the grammar, and a few of my tests broke :(

Is this going to be fixed soon. I'd rather not have to work around it :-)

@winstliu
Copy link
Contributor

I'll see what I can do today.

@winstliu winstliu self-assigned this Nov 20, 2015
@DavidLGoldberg
Copy link

@50Wliu, I'd love to take a look tonight and this weekend, but couldn't quickly spot the commit, do you happen to know which one it was that broke it?

@winstliu
Copy link
Contributor

@DavidLGoldberg If I had to guess, #24 (there was a small modification in 05efcd8 though). I think an underscore is a valid word boundary so you're going to have to work around that through a negative lookbehind.

@winstliu winstliu removed their assignment Nov 20, 2015
@DavidLGoldberg
Copy link

The SHA above is definitely the one that breaks it from what I can tell with:
apm develop language-sql and restoring the previous.

It also passes all of my tests (I thought I introduced another issue, but it turns out it was just that line from the SHA :\ )

I'll try to investigate further. as far as seeing if it potentially breaks something else too? Although, I have to confess I have very little chance of helping out with that regex :(
Where are the best docs/tutorials on this grammar stuff btw? Sublime community still maybe?

@winstliu
Copy link
Contributor

Docs are somewhat lacking on grammar development, unfortunately. In general Atom follows the Textmate guidelines since most of the grammars were converted from Textmate, but the guidelines are pretty vague.
There's an ongoing PR to develop a more cohesive standard in atom/flight-manual.atom.io#114.

@diesire
Copy link
Contributor

diesire commented Dec 15, 2015

I'm having the same problem with v0.20.0

image

Note that table name T1 is OK, but all fields are broken

image

I guess it's because T1 is recognized as an entity but FIELD not, so in the first the entity takes precedence over the number but in the last the number rule applies

@winstliu
Copy link
Contributor

Fixed by #34.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants