billymoon / Stylus

Stylus Package for Sublime Text 2 / 3
Other
129 stars 31 forks source link

Highlight SVG elements as tags #54

Closed adelgado closed 9 years ago

adelgado commented 9 years ago

I couldn't get SVG elements whose names include dashes to work. I would appreciate any guidance :-)

grassator commented 9 years ago

Unfortunately I can't test this code right now, can you explain what is the problem with dashed names? They don't work at all or incorrectly highlighted?

adelgado commented 9 years ago

I mean they are incorrectly highlighted. The segment after the hyphen gets displayed in the wrong color. I'll take a deeper look at it later in the week.

grassator commented 9 years ago

I finally had some time to investigate. The problem seem to stem from the fact that regular expressions are greedy in sublime, so when it matched font it just stopped. The easy fix would be to just put SVG tag list before the HTML.

Please make the change and I will happily merge this PR.

adelgado commented 9 years ago

/cc @grassator :-)