Closed UnknownPlatypus closed 3 months ago
Sorry I'm busy on something else so your PRs will be reviewed later.
No worries, take you time. Thanks for the tool, I'm enjoying a lot poking around with it
You're right. This solution isn't elegant enough, but after thinking I found it may be hard to avoid storing original quotes. However, if we decide to store original quotes to AST, the rest of implementation can be better. Should I create another PR or continue working on this PR?
Feel free to open a new PR, I feel like you'll have some smart ideas to solve this.
I also don't see a way to avoid storing the original quote in the ast, when the printer discover there are both quote styles in the same string, it must be aware of the original one to avoid breakage.
Superseded by #37
markup_fmt
parses just fine and attribute containing single & double quote (often happens for any kind of interpolation inside the value) but then try to switch the quote style when formatting resulting in cropping the attribute value.For ex here, data-content is cropped to
'{% if status == "active" %}I'
:I'm not very happy with my fix,
format_attr_value
has a lot of fields now but at least it work. Feel free to solve this another way, you'll probably have better ideas.