-
-
Notifications
You must be signed in to change notification settings - Fork 575
Implement multiline attributes #1043
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
Conversation
This is a weird use case of Ripper.lex which I'm not sure is supposed to be maintained, so I'm adding this test so that we can easily notice such changes. If we change the behavior, this will break the behavior of hamlit.gem v1 and code like haml/haml#1043.
Whoa... I didn't see this! @k0kubun– you... you.... <3 |
haml/haml#1043 was released at Haml 5.2.1.
haml/haml#1043 was released at Haml 5.2.1.
https://build.opensuse.org/request/show/865194 by user coolo + dimstar_suse updated to version 5.2.1 see installed CHANGELOG.md ## 5.2.1 Released on November 30, 2020 ([diff](haml/haml@v5.2.0...v5.2.1)). * Add in improved "multiline" support for attributes [#1043](haml/haml#1043) ## 5.2 Released on September 28, 2020 ([diff](haml/haml@v5.1.2...v5.2.0)). * Fix crash in the attribute optimizer when `#inspect` is overridden in TrueClass / FalseClass [#972](haml/haml#972) * Do not HTML-escape templates that are declared to be plaintext [#1014](haml/haml#1014) (Thanks [@cesarizu](https://github.com/cesarizu)) * Class names are no longer ordered alphabetically, and now follow a new specification as laid ou
A simple |
Sorry, I wasn't able to reproduce it. Could you prepare a repository that reproduces your issue? Thanks.
|
@k0kubun turns out it's a Ruby 2.4 issue. 2.5, 2.6, and 2.7 work fine.
|
Yeah, it seems like a bug of Ripper (a part of Ruby). The problem is that the parser reorders tokens in edge cases like that, and it's a bit hard to implement a fix on Haml's side. Thus the bug report should go to ruby-core, instead of this haml repository.
JFYI, 2.3 also works fine. 2.2 and older have the bug, like 2.4.
|
@kshnurov what would that mean to you? We only test against Ruby 2.7+, and I wouldn't think we should error unless necessary. |
@hcatlin README says |
Sorry for confusing you maybe by leaving a premature GitHub Actions config, but we currently test 2.5+ in Travis Lines 9 to 10 in d3839d3
If we want to clarify the supported versions, Line 26 in d3839d3
|
Thanks for the clarification everyone. |
haml/haml#1043 was released at Haml 5.2.1.
haml/haml#1043 was released at Haml 5.2.1.
Fixes #981.
This is ported from Hamlit v1 code which supported multiline attributes. It was dropped when Hamlit started using Haml's parser in v2, but I'd be happy to resurrect the support. Please read the code comments for design decision details.