Home Download Buy Blog Forum Support

Haml Comment Suggestion

Haml Comment Suggestion

Postby nathansmith on Mon Dec 05, 2011 5:49 am

I think that the default line comment when editing *.haml files should be "-#" instead of "/"

Reason being, anything commented with a "/" is output as "<!-- ... -->" HTML comments, and sent to the browser.

Given that you'd probably want to keep this in the Ruby side, and not emit it to the HTML (when commenting out potentially sensitive code), I would just always make the default the "Ruby way" of a dash, to switch into Ruby mode, and then the hash, to comment out the rest of the line.

Here's an example of that style of comment...


And here's the necessary change to the "Ruby Haml Comments.tmPreferences" file (line 17). Just change "/" to "-#"...


— And you're all set. :)
Posts: 1
Joined: Mon Dec 05, 2011 5:42 am

Re: Haml Comment Suggestion

Postby broodlum on Sat Feb 25, 2012 1:55 am

Found this thread from a Google search and just wanted to pop in and say thanks, since this is exactly what I was looking for. Keep making the internet a better place.
Posts: 3
Joined: Wed Jan 18, 2012 4:41 am

Re: Haml Comment Suggestion

Postby kakubei on Sat Sep 15, 2012 8:23 am

I've done this but it still gives me the old / style. Could there be anything else overriding this?
Posts: 58
Joined: Sun Sep 25, 2011 9:19 am

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: Google [Bot] and 12 guests