-
Notifications
You must be signed in to change notification settings - Fork 54
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
whitespace removal syntax not working with php-statements #53
Comments
Same thing in Haml/TWIG when using if/for/macros/etc. White space removal is really useful when using inline or inline-block positioning for horizontal layouts, i.e. this is not just cosmetic. See: http://css-tricks.com/fighting-the-space-between-inline-block-elements/, stmh's issue above is the same thing. |
Whitespace removal won't work for me at all. This MtHaml: %span.text-small><
(
= $no_reviews
) produces this HTML: <span class="text-small">(
16 )</span> Please mark this a a bug. PS Haml docs: http://haml.info/docs/yardoc/file.REFERENCE.html#whitespace_removal__and_ |
From your example, it works as documented: it removes whitespace just after See the example from HAML/Ruby documentation: %img
%pre><
foo
bar
%img is compiled to: <img /><pre>foo
bar</pre><img /> Note that you can make use of interpolations, for this use-case: %span.text-small (#{$no_reviews}) ( |
@arnaud-lb, i'm quoting the documentation:
Neither works for me. From my excerpt, you can only tell about the latter, but surrounding whitespace is also not removed. Oh, i'm also inside a |
One difference, though, is that in HAML/Ruby, |
Marked as bug |
The only reason to use whitespace removal for me is the inline-block grid technique. Whitespace adds to row width, ruining the grid. If MtHaml can't properly remove indentation, then whitespace removal is not working and thus useless. |
I hacked in some changes in my fork that enable me to remove whitespace using <> where I need to. It ruins pretty printing because it's not possible to determine the right thing to do in some cases (macros/conditionals output in first and last node? memory is getting fuzzy...). From: lolmausSent: Thursday, July 10, 2014 12:45 PMTo: arnaud-lb/MtHamlReply To: arnaud-lb/MtHamlCc: chrisrichardSubject: Re: [MtHaml] whitespace removal syntax not working with php-statements (#53) The only reason to use whitespace removal for me is the inline-block grid technique. Whitespace adds to row width, ruining the grid. If MtHaml can't properly remove indentation, then whitespace removal is not working and thus useless. —Reply to this email directly or view it on GitHub. |
I've tried the
Putting this inside a in @arnaud-lb, any progress on this one? |
Any update? |
Bump, it would be nice to have this fixed. Not being able to control the white-space causes major problems with text in HTML |
Hi,
the php-renderer does not respect the whitespace-removal-settings of parent-nodes, which will introduce unwanted whitespaces.
Here's an example:
should render to something like
It looks not that easy to fix the underlying problem, so I replaced all write with raw in my fork. Is there an easy way to fix this?
The text was updated successfully, but these errors were encountered: