Skip to content

Node definition does not tokenise correctly for 'default' #65

@elfchief

Description

@elfchief

Describe the Bug

The puppet syntax highlighter gets confused about single quotes in comments that exist inside a node{} block where the list of nodes ends with a bareword (e.g. default). Single quotes in comments should always be ignored, but instead they start highlighting text as though a new static string had been started. (See attached images for examples)

Expected Behavior

Comments should always be treated as comments and not interact with syntax highlighting.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a new empty buffer
  2. Set buffer to 'Puppet' language mode
  3. Insert the following text:
node default {
  # This comment shouldn't matter
  if ($::something) {
    fail("something")
  }
  # this comment shouldn't matter, either
}
  1. Observe VSCode starting a new 'static string' highlight in the middle of the first comment line

Environment

  • Extension version: 0.26.1
  • VSCode version: 1.45.1
  • Platform: MacOS Catalina (10.15.4)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions