htmlembedded Ruby (application/x-erb) breaks on <%# and -%> syntax #1788
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
mode: "application/x-ejs",tomode: "application/x-erb",and import<script src="../ruby/ruby.js"></script>. Open in browser.<% render "foo" -%><%# render "foo" %>Result:
All the following HTML tags lose their highlighting, and the HTML comment changes to incorrect highlighting
Expected:
Since this is valid ERB syntax, the rest of the file's coloring shouldn't change.
(Note that the other syntax mentioned there,
<%=, works fine).mentioned in merge request !12137
Edit: forgot you need to add another
<script>tag to make the test page work. Added to description now.The htmlembedded mode is contributed, and, now that I look at it, not of a terribly high quality. It'd have to do the tricks that the mode multiplexer uses to be robust. Or, even better, it could just be written on top of the addon/mode/multiplex.js
mentioned in issue #4587