polarblau / meta_wordpress

Use your favorite meta languages such as Haml, Sass and Coffeescript to bootstrap and build Wordpress themes.
MIT License
9 stars 1 forks source link

Improve indentation within PHP blocks #20

Open polarblau opened 11 years ago

polarblau commented 11 years ago
= php "if (post_password_required()):" do
  %p.no-password
    This post is password protected. Enter the password to view any comments.
  = php "return null"
= php "endif"

renders to

<?php if (post_password_required()): ?>
<p class='no-password'>
  This post is password protected. Enter the password to view any comments.
</p>
<?php return null ?>
<?php endif ?>

but should be

<?php if (post_password_required()): ?>
  <p class='no-password'>
    This post is password protected. Enter the password to view any comments.
  </p>
  <?php return null ?>
<?php endif ?>
polarblau commented 11 years ago

This should help: http://haml.info/docs/yardoc/Haml/Helpers.html#with_tabs-instance_method