Skip to content

support for :preserve tag? #161

@davidtingsu

Description

@davidtingsu

The preserve tag is used to keep newline characters.
From the haml source code:

Takes any string, finds all the newlines, and converts them to
HTML entities so they'll render correctly in
whitespace-sensitive tags without screwing up the indentation.

Here is an example:
https://github.com/haml/html2haml/blob/c41cb712816d2ea4300e7c1730328a59a63b2ba7/test/html2haml_test.rb#L196

http://haml.info/docs/yardoc/file.REFERENCE.html#filters
Ruby implementation:
https://github.com/haml/haml/blob/520d92cc4f52ffe0983b2760ea798c1680476019/lib/haml/helpers.rb#L107
https://github.com/haml/haml/blob/520d92cc4f52ffe0983b2760ea798c1680476019/lib/haml/helpers.rb#L128

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions