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 failing with chain arrows and underscore in class name #43

Closed
glennsarti opened this issue Aug 22, 2019 · 0 comments · Fixed by #44
Closed

Syntax failing with chain arrows and underscore in class name #43

glennsarti opened this issue Aug 22, 2019 · 0 comments · Fixed by #44
Assignees
Milestone

Comments

@glennsarti
Copy link
Contributor

Editor Name and Version: (If applicable)
Theme: (If applicable)
Document: (Include the whole document)

What You Are Seeing?

What is Expected?

How Did You Get This To Happen? (Steps to Reproduce)

# IIS Web Server
class web (
  String $site_path = 'E:\\Dev\\Website\\',
  String $website_name = 'new_website',
  String $app_pool_name = 'app_pool',
){
  windowsfeature{['Web-Server' , 'Web-Asp-Net45']:
    ensure => present
  }

  iis_application_pool { $app_pool_name:
    ensure                  => 'present',
    state                   =>' started',
    managed_pipeline_mode   => 'Integrated',
    managed_runtime_version => 'v4.0',
  }

  -> iis_site { $website_name:
    ensure          => 'started',
    physicalpath    => $site_path,
    applicationpool => $app_pool_name,
    require         => Iis_application_pool[$app_pool_name]
  }

  file { $site_path:
  ensure => 'directory'
  }
}

Note should also check ~> as well as ->

image

glennsarti added a commit to glennsarti/puppet-editor-syntax that referenced this issue Aug 23, 2019
… chain arrows

Previously the sytnax highlighting for resource references did not work for
valid names.  Although Puppet Types do not allow an underscore, Resource
References, which are technically types, do.  This commit changes the regex to
allow underscores as there's no way for the parser to know what kind of
reference it actually is

Previously the highlighting of class names after a chain arrow was failing. This
was due to the chain arrow not absorbing the whitespace after it.  This commit
changes the chain arrow regex to consume trailing and leading whitespace.

This commit also adds tests for these scenarios.
glennsarti added a commit to glennsarti/puppet-editor-syntax that referenced this issue Aug 25, 2019
… chain arrows

Previously the sytnax highlighting for resource references did not work for
valid names.  Although Puppet Types do not allow an underscore, Resource
References, which are technically types, do.  This commit changes the regex to
allow underscores as there's no way for the parser to know what kind of
reference it actually is

Previously the highlighting of class names after a chain arrow was failing. This
was due to the chain arrow not absorbing the whitespace after it.  This commit
changes the chain arrow regex to consume trailing and leading whitespace.

This commit also adds tests for these scenarios.
jpogran added a commit that referenced this issue Aug 25, 2019
(GH-43) Fix syntax highlighting for resource references and chain arrows
@glennsarti glennsarti added this to the 1.3.3 milestone Aug 26, 2019
@glennsarti glennsarti added this to To do in 0.20.0 Marketplace Release via automation Aug 26, 2019
@glennsarti glennsarti self-assigned this Aug 26, 2019
@glennsarti glennsarti moved this from To do to Done in 0.20.0 Marketplace Release Aug 26, 2019
@jpogran jpogran removed this from Done in 0.20.0 Marketplace Release Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant