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
Twig allows a Block Shortcuts syntax:
{% block title %} {{ page_title|title }} {% endblock %} {% block title page_title|title %}
The plugin doesn't appear to recognise this at the moment.
[error] templates/_layouts/base.twig: Error: ERROR: Invalid Token [error] 26 | #} [error] 27 | {% block page_main %} [error] > 28 | <main class="{% block main_class '' %}"> [error] | ^^ [error] 29 | {% block main %}{% endblock %} [error] 30 | </main> [error] 31 | {% endblock %} [error] [error] Expected stringEnd but found tag start "{%" instead. [error] at TokenStream.error (file:///…/node_modules/@zackad/prettier-plugin-twig/src/melody/melody-parser/TokenStream.js:129:24) [error] at TokenStream.expect (file:///…/node_modules/@zackad/prettier-plugin-twig/src/melody/melody-parser/TokenStream.js:103:14) [error] at Parser.matchAttributes (file:///…/node_modules/@zackad/prettier-plugin-twig/src/melody/melody-parser/Parser.js:413:28) [error] at Parser.matchElement (file:///…/node_modules/@zackad/prettier-plugin-twig/src/melody/melody-parser/Parser.js:337:14) [error] at Parser.parse (file:///…/node_modules/@zackad/prettier-plugin-twig/src/melody/melody-parser/Parser.js:211:32) [error] at Object.parse (file:///…/node_modules/@zackad/prettier-plugin-twig/src/melody/melody-extension-core/parser/block.js:42:24) [error] at Parser.matchTag (file:///…/node_modules/@zackad/prettier-plugin-twig/src/melody/melody-parser/Parser.js:498:31) [error] at Parser.parse (file:///…/node_modules/@zackad/prettier-plugin-twig/src/melody/melody-parser/Parser.js:177:32) [error] at Object.parse (file:///…/node_modules/@zackad/prettier-plugin-twig/src/parser.js:82:24) [error] at parse4 (file:///…/node_modules/prettier/index.mjs:20724:24)
The text was updated successfully, but these errors were encountered:
The problem with your example is related to GH-61 that block expression in html attribute is not yet supported.
Sorry, something went wrong.
It turns out that block shortcut syntax has been supported. I fix printing string literal as block body value when using shortcut syntax.
fd5b244
Successfully merging a pull request may close this issue.
Twig allows a Block Shortcuts syntax:
The plugin doesn't appear to recognise this at the moment.
The text was updated successfully, but these errors were encountered: