This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 250525

Summary: Var keyword not colored correctly
Product: javascript Reporter: Vladimir Riha <vriha>
Component: JadeAssignee: Petr Pisl <ppisl>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: screenshot

Description Vladimir Riha 2015-02-19 10:14:11 UTC
Created attachment 152079 [details]
screenshot

Please try following:


      #caramba
      - var pokus = 10
      - var friends = pokus
      case friends
        when 0
          p you have no friends
        when 1
          p you have a friend
        default
          p you have #{friends} friends
      #a
      - var justtest = 0
      case justtest
        when 0
        when 1
          p you have very few friends
        default
          p you have #{justtest} friends




=> notice that the 3rd "var" in "var justtest = 0" is black, not blue


Thank you


Product Version: NetBeans IDE Dev (Build web-main-1959-on-20150219)
Java: 1.8.0_25; Java HotSpot(TM) Client VM 25.25-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b17
System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)
Comment 1 Petr Pisl 2015-03-12 16:45:15 UTC
IMHO this is a problem of embedded coloring. When there is one sequence embedded to another one, then some times the first token of embedded sequence has the same color as the last one of previous sequence.
Comment 2 Christian Lenz 2017-06-16 14:22:19 UTC
I think there is a rethink about using more than one language in an other (embedded language) and how NetBeans handle is. I know this is offtopic in this but each time  I use a plugin which brings an other language support into an other like twig in HTML or JS like JSNI to Java and so on, there is always a problem with maybe the code completion and other stuff. Only to let you know that there is a general problem how NetBeans treats embedded languages.

We hafve Markdown where you can have HTML inside. We have Jade where you can have HTML inside. The only one that handles everything right is an HTML file with HTML, JS and CSS, how is this done? 3 Languages inside 1 filetype and it treats right?