-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ST3 does not correctly highlight hyphenated elements in Ruby HAML #60
Comments
From @iamntz on August 4, 2013 20:9 Call me crazy, but there are tags with hypen? Can you name some?
On Sunday, 4 August 2013 at 21:02, Niall Smart wrote:
|
From @FichteFoll on August 5, 2013 1:13 Maybe when you are using HAML for generating custom XML, but I don't think this would be appropriate in an embedded HAML highlighter (Ruby), only for standalone HAML. |
From @niallsmart on August 5, 2013 1:27 It's quite common when using AngularJS. Hyphens are used in many built-in directives and in custom directives by convention. For an example see ng-include. |
From @iamntz on August 5, 2013 3:34 Ah! So for attributes! |
From @niallsmart on August 5, 2013 3:39 Well those too, but this bug is for element names :) |
From @niallsmart on August 5, 2013 3:40 Like this: <ng-include src="file.html"/> |
From @giosakti on August 24, 2013 7:17 +1 this should be merged.. it's kinda bugging me too when writing angularJS app using haml :) |
From @dillonforrest on November 11, 2014 21:32 Hey guys, just wanted to voice my support in having this merged! I'm also using angular in haml at the moment, and the issue appears. |
I would also like this to be merged. Hyphenated tags are going to become (and already have, to some extent) much more common with the popularity of polymer and angular directives. There is a HAML package on Package Control which comes from textmate and correctly renders hyphenated tags, but I don't think it should be necessary to install. |
Hyphenated tags are part of the W3C spec and are required when creating custom elements via the Web Component Custom Element spec. They are required in the Angular and Polymer frameworks. So there is both a useful reason and a standard indicating that hyphen should be officially added to the HTML and HTML-based parsers. |
+1 also useful for auto indentation... which is bothering me more than syntax highlighting. |
You can make a PR to https://github.com/sublimehq/Packages/blob/b03686a46ec3aef97098a636df0348600aca6933/Rails/Ruby%20Haml.sublime-syntax if you wish to fix this. |
From @niallsmart on August 4, 2013 18:2
ST3's Ruby HAML highlighter does not correctly highlight tag names containing hyphens – it stops at the first hyphen. For example, in the fragment below, it just highlights
%foo
This patch fixes the issue:
https://gist.github.com/niallsmart/6151200
Copied from original issue: sublimehq/sublime_text#119
The text was updated successfully, but these errors were encountered: