Skip to content
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

Syntax highlighting (mostly in maps) is strange #186

Open
djfarly opened this issue Feb 6, 2015 · 2 comments
Open

Syntax highlighting (mostly in maps) is strange #186

djfarly opened this issue Feb 6, 2015 · 2 comments

Comments

@djfarly
Copy link

djfarly commented Feb 6, 2015

Maps are defined as:

$map: (key1: value1, key2: value2, key3: value3);

I'm experiencing are a few issues with their syntax highlighting in sublime 3.
Sublime 3 - Syntax highlighting in maps

$map: (
    // comments are not recognized
    key1: value1,
    key-two: value2, 
    text-key: value-three, /*multiline comments aren't as well*/
    another-key: some-value
);

From what I can tell the above code is compiled correctly... highlighting does not suggest it does...

  • strings with a dash are not recognized quite right (this seems to be true outside maps too):
    reserved words are highlighted... Here reserved words are highlighted in a string.
  • also number values pop out
  • comments are not recognized

I imagine finding string when there are no delimiters like ", ' is pretty hard if not impossible?
Also I am not 100% sure if my scss syntax correct... :)

Cheers, jan

@ghost
Copy link

ghost commented May 22, 2015

Would love to see this feature as well, mostly concerned with map keys being highlighted the same.

@acarnwath
Copy link

acarnwath commented Apr 5, 2018

This has driven me crazy for quite some time - the following map gets all sorts of crazy highlighting, and anything after it is also affected.
In the meantime, I switched over to the Sass plugin using the SCSS highlighting - it handles this issue fine.
screen shot 2018-04-05 at 11 10 49 am

$encoding-reference: (
  //('%','%25'),  // Encode "%" first, otherwise the "%" from encoded code would be encoded again (which would be bad)
  ('<','%3C'),
  ('>','%3E'),
  //('"','%22'),  // Replace " with ' because that's shorter than %22 and normally working
  ('"','\''),
  ('#','%23'),
  ('&','%26')
  // Here are a few more characters you could encode
  //(' ','%20'),
  //('!','%21'),
  //('$','%24'),
  //(',','%27'),
  //('(','%28'),
  //(')','%29'),
  //('*','%2A'),
  //('+','%2B'),
  //('"','%2C'),
  //('/','%2F'),
  //(':','%3A'),
  //(';','%3B'),
  //('=','%3D'),
  //('?','%3F'),
  //('@','%40'),
  //('[','%5B'),
  //(']','%5D'),
  //('^','%5E'),
  //('`','%60'),
  //('{','%7B'),
  //('|','%7C'),
  //('}','%7D'),
  //('~','%7E'),
  //(',','%E2%80%9A'),
  //('\\','%5C'),
  //('_','%5F'),
  //('-','%2D'),
  //('.','%2E'),
  // ('\','%5C'),
  // (' ','%7F'),
  // ('`','%E2%82%AC'),
  //('ƒ','%C6%92'),
  //('„','%E2%80%9E'),
  //('…','%E2%80%A6'),
  //('†','%E2%80%A0'),
  //('‡','%E2%80%A1'),
  //('ˆ','%CB%86')
);

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

No branches or pull requests

2 participants