Skip to content

Syntax highlight of Ruby is broken on percent notations #140

@alexr00

Description

@alexr00

Originally from @takaram in microsoft/vscode#137713

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.62.3, 1.63.0-insider
  • OS Version: Windows_NT x64 10.0.19042

Steps to Reproduce:

  1. Create .rb file
  2. Input code like below
puts %(() parentheses)
puts %<{} braces>
puts %Q{[] brackets}
puts %r[[^a-z]]
puts %(
  def foo()
    puts 123
  rescue
    nil
  end
)
puts %x(echo '() parentheses')

Expected:
The literal is recognized as strings (or regexp) until the closing bracket.
Specification of Ruby percent notations: http://www.chrisrolle.com/en/blog/ruby-percentage-notations

Actual:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions