Closed RobertBlaauwendraad closed 3 months ago
Also, the code inside the <body>
tag doesn't get indented, which I think is nice However <html>
does give indentation, maybe remove that as well?
I cannot reproduce this with the provided template. This is usually caused by having unpaired elements (such as those inside conditions/etc.), which causes issues with prettier. I would also check to see if this is caused by something similar to this on your end:
https://github.com/Stillat/blade-parser-typescript/issues/109#issuecomment-2278090058
Feel free to re-open if that is not the case.
Also, the code inside the
tag doesn't get indented, which I think is nice However does give indentation, maybe remove that as well?
IF the formatter encounters a catastrophic error, the original content will be returned. With valid input, code inside the <body>
will get indented.
This bug is caused by the @php(body_class())
part inside of the <body>
tag. Without it, it runs perfectly fine and indents it just as you said. Are you able to reproduce it now?
By the way, I can't re-open this issue :)
Thanks for the extra info. Are you running on the latest version? I will double check a few things on my end, but still haven't reproduced this one (but don't think you're wrong)
Yes I'm on the latest version. It seems that the @php(body_class())
part duplicates the body
, a
and span
tags and therefore thinks the first body
tag isn't closed?
Gives:
Wrapping
<body @php(body_class())>
and</body>
withformat-ignore
resolves the problem