Skip to content

When using a regex in a switch statement, the syntax highlighting is broken. #27

@glennsarti

Description

@glennsarti

Original issue from: @thehackadmin


When using a regex in a switch statement, the syntax highlighting is broken.

$expand_cmd = $current_muleee_file ? {
  /\.tar\.gz$/ => "/usr/bin/sudo tar -zx -f ${mulesoft_home}/${current_muleee_file} -C ${mulesoft_home}",
  /\.zip$/     => "/usr/bin/sudo unzip ${mulesoft_home}/${current_muleee_file} -d ${mulesoft_home}",
  default      => "not confiugred to use this type of file: ${current_muleee_file}"
}

Is valid... maybe not great, but valid. (don't judge me! lol) But it looks like:
image

If I remove the all of the "/", it looks good, but will not work as expected:
image


Cross reference: puppetlabs/puppet-vscode#487

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions