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.

Losses syntax highlighting and text becomes grey when adding erb tags in Ruby #261

Open
@anihakutin

Description

@anihakutin

Prerequisites

Description

Code after inserted erb text becomes grey and losses syntax highlighting.
Closing the file and then reopening it fixes the issue.
I did see this mentioned in issue #18342 but that was closed and the syntax highlighting doesn't seem to be fixed.
Safe mode does not solve this problem.

Steps to Reproduce

  1. Create .erb file with html
  2. Add erb tag to html element
  3. Text will lose syntax highlighting (see screen recording below)

Edit by @rsese to add more detailed repro steps

  1. Create and save a .erb file with this content:
<h1>Update Owner</h1>

<form method="post">
  <input action="/owners/" type="hidden" id="hidden" name="_method" value="patch">

  <label for="">Name: </label>
</form>
  1. Start typing <%=@owner.id%> after the "/owners/" in the <input> tag.

**Interesting note:
If I add the "=" after i close the tag it highlights and formats correctly, see 2nd screen recording.

Expected behavior: [What you expect to happen]
Highlighter should highlight syntax correctly

Actual behavior: [What actually happens]

After typing the > in <%=@owner.id%>, the rest of the content loses highlighting (as mentioned above, closing and reopening the file seems to clear things up).

See screen recording:
giphy 1

Screenshot:
screen shot 2019-02-09 at 11 40 54 pm

When adding the "=" after closing the tag:
giphy 2

Reproduces how often: [What percentage of the time does it reproduce?]
Everytime.

Versions

Atom : 1.34.0
Electron: 2.0.16
Chrome : 61.0.3163.100
Node : 8.9.3
MacOS Mojave 10.14.2 (18C54)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions