Skip to content
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

support for :preserve tag? #161

Open
davidtingsu opened this issue Jul 15, 2014 · 0 comments
Open

support for :preserve tag? #161

davidtingsu opened this issue Jul 15, 2014 · 0 comments

Comments

@davidtingsu
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant