Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

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

Open

Description

@Wonderer0

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions