Losses syntax highlighting and text becomes grey when adding erb tags in Ruby #261
Description
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: https://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
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
- Create .erb file with html
- Add erb tag to html element
- Text will lose syntax highlighting (see screen recording below)
Edit by @rsese to add more detailed repro steps
- 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>
- 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).
When adding the "=" after closing the tag:
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)