Skip to content
New issue

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

Print macro is context-specific #158

Open
martinbohmcz opened this issue Mar 4, 2024 · 0 comments
Open

Print macro is context-specific #158

martinbohmcz opened this issue Mar 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@martinbohmcz
Copy link

Is your feature request related to a problem? Please describe.
When I am printing array using inside javascript, Latte Plugin (v1.2) underlines the print macro with "Print invalid type: array".

Minimal code to reproduce.

{var $var = [1,2,3]}
<script>
	const annotations = {$var};
</script>

Print macro is obviously context-specific. See: https://fiddle.nette.org/latte/#b7da4d3c6c

Describe the solution you'd like
Would it be possible the plugin does not report printing array inside <script> (or any other allowed context) as an error?

@martinbohmcz martinbohmcz added the enhancement New feature or request label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant