Skip to content

Whitespace removal with indentation #1114

Closed

Description

@kentarohonda

Hello.

Upgrading from 5.2.2 to 6.0.10, I find outer whitespace removal > doesn't remove some newlines.
A minimal example is the following.

- if true
  a
%br>
b

is compiled to

a
<br>b

But, Haml 5.2.2 compiles it to

a<br>b

, which is my expected output.

I produced this example using Haml 6.0.10

# haml version
6.0.10

Thank you.

Activity

  1. k0kubun commented on Nov 26, 2022

    @k0kubun
    Member

    Fixed in 6.0.11.

  2. kentarohonda commented on Nov 27, 2022

    @kentarohonda
    Author

    @k0kubun
    Thank you for fixing.
    I confirm v6.0.11 works well for the above example, but I find a newline still remains when else block exists and if block is rendered.
    As a new minimal example,

    - if true
      a
    - else
      b
    %br>
    c

    will be

     a
    <br>c

    though the output of v5.2.2 is

    a<br>c
  3. added a commit that references this issue on Nov 27, 2022
  4. k0kubun commented on Nov 27, 2022

    @k0kubun
    Member

    Fixed in v6.0.12.

  5. kentarohonda commented on Nov 27, 2022

    @kentarohonda
    Author

    Thank you for so quick fixing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions