We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi 👋
Thanks for the plugin :)
It seems I have an issue very similar to this closed one: #8
For example, prettier can't format this piece of code:
<button class="fr-btn" type="submit" <% if (locals.ariaLabel) { %>aria-label="<%= locals.ariaLabel %>"<% } %>> <%= label %> </button>
Because of the test inside the button opening tag:
[error] src/[...].ejs: SyntaxError: Opening tag "button" not terminated. (14:5) [error] 12 | <% } %> [error] 13 | </span> [error] > 14 | <button class="fr-btn" type="submit" <% if (locals.ariaLabel) { %>aria-label="<%= locals.ariaLabel %>"<% } %>> [error] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [error] 15 | <%= label %> [error] 16 | </button> [error] 17 | </div>
I'm using the latest plugin version and latest prettier version. I also tried the nested EJS example in the readme and it crashes too.
Is there something I missed? Thanks!
The text was updated successfully, but these errors were encountered:
Experienced the same issue where a Syntax Error is generated when EJS closures occur within Markup Element Start Tag.
INPUT
<!DOCTYPE html5> <html lang="en"> <head> <title></title> <% for (const $meta of $data.content.meta) { %> <meta <% for(const $metaAttribute of $meta.attributes) { %> <%= $metaAttr.key %>="<%= $metaAttr.val %>" <% } %> /> <% } %> </head> <body> </body> </html>
OUTPUT
SyntaxError: Opening tag "meta" not terminated. (6:7) 4 | <title></title> 5 | <% for (const $meta of $data.content.meta) { %> > 6 | <meta | ^^^^^^ > 7 | <% for(const $metaAttribute of $meta.attributes) { %> | ^^^^^^^^^ 8 | <%= $metaAttr.key %>="<%= $metaAttr.val %>" 9 | <% } %> 10 | />
It also appears that one of the given tests from the README fails, FYI:
<td <% if (styleData) { %> style="<%= styleData %>" <% } %>> <%= data %> <%= data %> </td>`
SyntaxError: Opening tag "td" not terminated. > 1 | <td <% if (styleData) { %> | ^^^^ 2 | style="<%= styleData %>" <% } %>> 3 | <%= data %> 4 | <%= data %>
Sorry, something went wrong.
@thomaspatrickwelborn I experienced the same issue. I am using the older prettier 2.8.8 as a workaround
prettier 2.8.8
No branches or pull requests
Hi 👋
Thanks for the plugin :)
It seems I have an issue very similar to this closed one: #8
For example, prettier can't format this piece of code:
Because of the test inside the button opening tag:
I'm using the latest plugin version and latest prettier version. I also tried the nested EJS example in the readme and it crashes too.
Is there something I missed? Thanks!
The text was updated successfully, but these errors were encountered: