language-pug icon indicating copy to clipboard operation
language-pug copied to clipboard

Statements in the next line of 'else' cannot be highlighted in atom.

Open Dafrok opened this issue 9 years ago • 3 comments

pug-template:

if foo
  a foo
else
  a bar // cannot be highlighted

Dafrok avatar Apr 18 '16 03:04 Dafrok

I have the same bug, it seams to because of the absence operand after else: I guessed it because there is no such issue with else if. I tried to fix it modifying this line. However I’m not sure it can change anything because I haven’t got a proper dev environment for this project. To be continued..

BuonOmo avatar Oct 20 '16 17:10 BuonOmo

I have the same issue. It's very annoying because I work with express and I have a lot of conditionals in my views. Any workarounds?

jakubrpawlowski avatar May 04 '17 20:05 jakubrpawlowski

+1 the first line after an else is greyed out, whereas consecutive lines are correctly highlighted.

A possible workaround could be making the else statement else if(true) which should mean the same thing as else. However, it pains me to edit code unecessarily like that just because of failures of syntax highlighting.

campbellgoe avatar Mar 23 '18 14:03 campbellgoe