atom / language-yaml

YAML package for Atom
Other
24 stars 39 forks source link

Not ignoring ERB tags in quoted string #32

Open ismyrnow opened 9 years ago

ismyrnow commented 9 years ago

I have a quoted string which should contain <% in it. The result is that the string isn't closed unless a closing ERB tag and closing quote is found.

I'm not sure how you would work around this in the grammar without breaking the ERB highlighting. However, I would consider proper YAML highlight a priority, considering the context.

Example:

password: "foo<%bar"
now: highlighting no longer works
close: %>"
now: highlighting works

Currently, this also breaks in Github. However, I'll include a screenshot just in case:

2015-09-03_1113

ismyrnow commented 9 years ago

To reduce things even further, all you need to do is close the original quoted string on a new line:

password: "foo<%bar"
now: highlighting no longer works
close: "
now: highlighting works

The behavior on Github differs here, though.

kimroen commented 8 years ago

In my case, I wanted an interpolated string surrounded by < and >, so something like this:

user_line: "%{name} <%{email}>"
user_description: "This line has no syntax highlighting"
winstliu commented 7 years ago

Blocked on atom/first-mate#83.