Every repository with this icon (
Every repository with this icon (
| Description: | HTML Abstraction Markup Language - A Markup Haiku edit |
-
Something like the following should work:
/** * Stuff * More stuff */This is something to think about when implementing CSS-style syntax.
Comments
-
Run
rip install git://github.com/nex3/haml.git.Now, try and require Haml. It fails as the Version class tries to look for the VERSION file in the root directory of the Haml package. Uh oh. Rip doesn't keep anything around other than the lib directory of the gem so there is no VERSION file.
Comments
I'm of the opinion that packages should have access to their root directories. Haml uses this not only for reading the VERSION file, which could plausibly be moved into lib (although I don't think it actually belongs there), but for checking for git revision information and checking to ensure that the init.rb file for the Rails plugin is up-to-date.
Until there's some way to get access to this information from within Rip (or I'm convinced that it's not necessary to access it), Haml won't support Rip - or more accurately, Rip won't support Haml.
"Grit" library, which is used in official examples for rip, doesn't have a ripfile in its canonical repository. Instead, defunkt created a fork to add this ripfile, thus making it compatible with rip. You are free to do the same with Haml and maintain it.
-
0 comments Created 2 months ago by nex3BugMashxEasyxIntegrate Chris Eppstein's compass-colors Sass extensionsSassxSee chriseppstein/compass-colors. Only the Sass extensions (and corresponding HSL code) should be integrated - the color themes should be left there.
Most of the work for this will probably be in testing and documentation. The compass-colors tests aren't as complete as I'd like... it would be good to have tests for each of the new Sass functions. And the new functions should be documented in the YARD style of the rest of the Sass functions.
Comments
-
0 comments Created 2 months ago by nex3BugMashxHamlxImplement filter compositionMediumxAllow multiple filters to be composed in Haml - first apply the rightmost one, then work your way left. For example,
:preserve:escaped <foo> <bar /> </foo>should produce
<foo>
 <bar />
</foo>Comments
-
0 comments Created 2 months ago by nex3BugMashxEasyxImplement a :no_interpolation filter.HamlxThis filter should be the same as
:plain, except that it should interpret#{}within it as literal text, not interpolation. For example,:no_interpolation foo #{bar} bazshould compile to
foo #{bar} bazComments
-
0 comments Created 2 months ago by nex3BugMashxHamlxAllow variable indentation under certain circumstancesHardxCurrently, Haml insists that all indentation in a file be completely consistent. However, this means that it's not possible to get rid of a line without re-indenting everything beneath it, which is annoying when debugging code.
We want to allow variable indentation as long as it's unambiguous. For example, the following:
%foo %bar %baz bang boomshould be the same as
%foo %bar %baz bang boomHowever, wherever we currently would raise an error, a warning should be printed.
Ambiguous cases should still be marked as erroneous. For example, the following
%foo up four spaces down two spacesshould raise an error on the "down two spaces" line.
This is conceptually the same as issue #29, but since Sass and Haml don't share parser code, they're listed separately.
Comments
-
0 comments Created 2 months ago by nex3BugMashxHardxAllow variable indentation under certain circumstancesSassxCurrently, Sass insists that all indentation in a file be completely consistent. However, this means that it's not possible to get rid of a line without re-indenting everything beneath it, which is annoying when debugging code.
We want to allow variable indentation as long as it's unambiguous. For example, the following:
foo bar baz bang: bop boom: bipshould be the same as
foo bar baz bang: bop boom: bipHowever, wherever we currently would raise an error, a warning should be printed.
Ambiguous cases should still be marked as erroneous. For example, the following
foo up: four spaces down: two spacesshould raise an error on the "down: two spaces" line.
This is conceptually the same as issue #28, but since Sass and Haml don't share parser code, they're listed separately.
Comments
-
Colors printed by SassScript when the output format is
:compressedshould be printed in the smallest possible format. This means the shortest of "#nnnnnn", "#nnn", and the HTML4 color name, depending on what's available.Comments
-
0 comments Created 2 months ago by nex3BugMashxHamlxDon't quote attributes that don't require it with :uglyMediumxWhen running with
:ugly => trueand:format => :html4or:format => :html5, don't put quotes around attributes that don't require them. See the HTML4 spec for a precise definition of when they're not required.Comments
-
1 comment Created 2 months ago by nex3BugMashxHamlxDon't output unnecessary closing tags with :uglyHardxWhen running with
:ugly => trueand:format => :html4or:format => :html5, don't output closing tags that aren't required. A list of closing tags that aren't required is given here. Note that sometimes these closing tags should be printed. In particular, if the closing tag isn't followed immediately by an opening or tag - one generated by Haml - output it. For example, in all of the following situations:%p foo <strong>bar</strong> %p foo = "<strong>bar</strong>" %p foo :plain <strong>bar</strong>the closing tag should be preserved.
Warning: it's likely to be very difficult to figure out exactly when you may and may not output a closing tag.
Comments
See my hack. Note that it doesn't do any checks described above
-
0 comments Created 2 months ago by jsmestadhaml single string quoting should highlight properlyEmacsxcurrently only double quotes will highlight as a string, single quotes are just as valid and should be highlighted also.
Comments
-
0 comments Created 2 months ago by nex3Make Sass errors show up properly in SinatraSassxThis is probably an issue in all sorts of Sass frameworks... we might want to make the solution more general-purpose.
Comments
-
This should behave just like the
:javascriptfilter, except with<style>tags instead of<script>tags.Comments
-
0 comments Created 2 months ago by nex3Sass errors should list their mixin backtrace.SassxFor example,
=box-shadow(!value) -moz-box-shadow= !value -webkit-box-shadow= !value +box-shadow(0 1px 3px rgba(0, 0, 0, 0.5))should list both line 2 and line 5 in the backtrace. This should integrate with the existing import backtrace.
Comments
-
At the beginning of the file,
// encoding: nameshould have an effect as close as possible to that of Ruby's# encoding: namedeclarations.Note that this is currently not applicable to Haml because Haml templates are usually loaded externally to Haml. See #38.
Comments
-
Raising an issue to open discussion. I don't know either Haml or Mustache codebase well enough to start work on this straight away.
Chris Wanstrath (aka defunkt) has just released a great template engine 'Mustache' based on Google's CTemplate.
As a templating solution Mustache is great, but I don't think anybody can deny the cleanness and readability of HAML code.
I don't think it would be too difficult to modify HAML to support Mustache-like generation. This could even be an option on HAML which could be turned on an off.
I'm thinking something like:
a) no ruby code evalution, so (-, =) no longer evaluate.
b) new syntax
{{#boolean}},{{helper}},{{{non_interpreted_helper}}}can be used anywhere in the code(ie as nodes and inside text nodes) and will be evaluated as expected.c) integration into rails could be very simple. All template logic now goes into the helpers files.
Comments
I think this would make the most sense as a separate library that integrated Haml and Mustache, probably most easily by simply passing the output of a slightly-modified Haml to Mustache. Haml has a
:suppress_evaloption that will suppress Ruby evaluation, which would help.For Mustache nodes that take blocks (e.g.
{{#foo}}), there could be some integration with Haml. This could be done hopefully without much difficulty by subclassing Haml::Precompiler.
adamsalter
Sun Oct 04 21:08:31 -0700 2009
| link
That doesn't sound too painful. I'll have a look at it an get back to you.
Note that technicalpickles has a gem to use mustache with rails:
http://github.com/technicalpickles/mustache-ride
Best gem name ever.











