Hello,
I use HAML in my project, and today I found two problems in it.
The first problem is whitespace-sencitive tags, like textarea or pre, and
indentation.
Haml::Helpers module provides 'preserve' function to change newlines into HTML
codes. But what is the correct way not to indent the very first line of the
text?
For example:
%textarea{:name => 'blablabla'}= preserve('The very very long line ...')
Produced code:
<textarea name='blablabla'>
The very very long line ...
</textarea>
and I will see the first text line with some spaces.
The second problem is unnecessary spaces in text. For example, I need a link,
then a comma and then some text after it.
Haml::Helpers provides a solution in 'succeed' function, that works in simple
cases. But suppose the code:
= succeed ',' do
%a{:href => 'http://somewhere'}
%strong Somewhere
Generated code:
<a href='http://somewhere'>
<strong>Somewhere</strong>
</a>,
and I will see the space between the link and comma.
P.S. I use Gentoo Linux with up-to-date portage tree, and development version
of rails.
Ruby 1.8.6
Rails 1.2.3
HAML 1.5.2
--
Best regards,
Dmitry Root mailto:[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---