language-ruby icon indicating copy to clipboard operation
language-ruby copied to clipboard

Hash braces are wrongly parsed as scope (block) braces.

Open Wonderer0 opened this issue 8 years ago • 0 comments

Description

Braces enclosing hash definitions are parsed as syntax--scope elements (like braces enclosing blocks of code), but they should be parsed as syntax--hash elements (similar to syntax--array for brackets enclosing arrays).

Steps to Reproduce

  1. Create the following Ruby code in Atom editor:
{abc: 123}
  1. Open Atom's dev tools and inspect the HTML.

Expected behavior: The braces enclosing the hash definition should have HTML elements: <span class="syntax--punctuation syntax--section syntax--hash syntax--begin syntax--ruby"> and <span class="syntax--punctuation syntax--section syntax--hash syntax--end syntax--ruby">.

Actual behavior: The braces enclosing the hash definition have HTML elements: <span class="syntax--punctuation syntax--section syntax--scope syntax--begin syntax--ruby"> and <span class="syntax--punctuation syntax--section syntax--scope syntax--end syntax--ruby">,

Reproduces how often: Every time.

Versions

Atom : 1.18.0 Electron: 1.3.15 Chrome : 52.0.2743.82 Node : 6.5.0 apm 1.18.1 npm 3.10.10 node 6.9.5 x64 language-ruby : 0.71.0 Windows 7 Pro x64

Additional Information

Wonderer0 avatar Jul 15 '17 12:07 Wonderer0