Pig Fang
Pig Fang
You're right, and I'm thinking if there's a better solution.
We can move the "style" attribute detection here: https://github.com/g-plane/markup_fmt/blob/34be738967bed232cb3c4cf6a8dc9ab653229949/markup_fmt/src/printer.rs#L477 ```diff - && !is_multi_line_attr(attr) => + && !is_multi_line_attr(attr) + && !matches!(attr, Attribute::Native(attr) if attr.name == "style") => ```
I've come up with several solutions, but none of them are perfect: 1. When processing attributes, modify the state to record if it contains line breaks. This needs `&State` to...
> Option 2 is maybe nice, even the API can change, it most likely won't and if it does, it would only require minor changes for this feature ? No,...
> we might be ok with relying on these privates I wouldn't consider using private items. This is not an effective solution. > We could probably check if an external...
You're right. It's too hard and complicated to solve. Out of the implementation, I personally discourage such code. This can't be easily understood, and neither Vue and Svelte nor other...
That will be nice.
Maybe the parser. We can try parsing as normal elements, but fall back to text node if it fails.
Maybe using with Malva should be better. I'll do it.
This isn't expected, and the latter example you gave should be preferred. But, for the example below, they shouldn't stay on the same line: ```html a b ```