shufo / prettier-plugin-blade

Format your blade template using Prettier
https://www.npmjs.com/package/@shufo/prettier-plugin-blade
MIT License
326 stars 8 forks source link

[Feature Request]: Setting to disable `</html>` and `</body>` validation #282

Closed vinkla closed 4 months ago

vinkla commented 5 months ago

Description

The plugin currently complains if a file has opening <html> and <body> tags but no closing tags. When using this plugin in WordPress and PHP templates (which works mostly great), it is common to place these tags in separate files. It would be helpful to disable the ending tag validation to prevent the following error messages:

[error] footer.php: SyntaxError: Unexpected closing tag "body". It may happen when the tag has already been closed by another tag.

Suggested Solution

Add a setting to disable the closing tag validation.

Alternatives

No response

Additional Context

No response