Skip to content
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

Open
titoBouzout opened this issue Dec 22, 2014 · 12 comments
Open

Comments

@titoBouzout
Copy link
Collaborator

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

%foo-bar(class="baz")

This patch fixes the issue:

https://gist.github.com/niallsmart/6151200

Copied from original issue: sublimehq/sublime_text#119

@titoBouzout
Copy link
Collaborator Author

From @iamntz on August 4, 2013 20:9

Call me crazy, but there are tags with hypen? Can you name some?

  • Ionut

On Sunday, 4 August 2013 at 21:02, Niall Smart wrote:

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
%foo-bar(class="baz")

This patch fixes the issue:
https://gist.github.com/niallsmart/6151200


Reply to this email directly or view it on GitHub (sublimehq/sublime_text#119).

@titoBouzout
Copy link
Collaborator Author

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.

@titoBouzout
Copy link
Collaborator Author

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.

@titoBouzout
Copy link
Collaborator Author

From @iamntz on August 5, 2013 3:34

Ah! So for attributes!
(i used haml only once, like ages ago)
Thanks.

@titoBouzout
Copy link
Collaborator Author

From @niallsmart on August 5, 2013 3:39

Well those too, but this bug is for element names :)

@titoBouzout
Copy link
Collaborator Author

From @niallsmart on August 5, 2013 3:40

Like this: <ng-include src="file.html"/>

@titoBouzout
Copy link
Collaborator Author

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 :)

@titoBouzout
Copy link
Collaborator Author

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.

@natecox
Copy link

natecox commented Jan 9, 2015

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.

@jacwright
Copy link

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.

@philippeluickx
Copy link

+1 also useful for auto indentation... which is bothering me more than syntax highlighting.

@keith-hall
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants