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

nesting within interpolated string is illegal in site #108

Open
dcnl1980 opened this issue Jan 27, 2019 · 2 comments
Open

nesting within interpolated string is illegal in site #108

dcnl1980 opened this issue Jan 27, 2019 · 2 comments

Comments

@dcnl1980
Copy link

I'm using Laravel 5.7 clean installation, and while trying to add this package with composer, add it to the app.php as Service Provider. The template is giving: "a nesting within interpolated string is illegal in site". Any ideas how to solve this? It seems php 7.1 related.

@dcnl1980
Copy link
Author

dcnl1980 commented Jan 27, 2019

I got it running, the tabs where making the script not working. So I removed after tab in the lines. But I got another problem.

I have a file colours.haml, it's rendering correctly but it's render it to php which is not supporting it at all.

Code:

- @colors = ['blue', 'indigo', 'purple', 'pink', 'red', 'orange', 'yellow', 'green', 'teal', 'cyan', 'gray', 'gray-dark'];
- @variants = ['100', '200', '300', '400', '500', '600', '700', '800', '900'];

Output:

<?php @colors = ['blue', 'indigo', 'purple', 'pink', 'red', 'orange', 'yellow', 'green', 'teal', 'cyan', 'gray', 'gray-dark']; ?>
<?php @variants = ['100', '200', '300', '400', '500', '600', '700', '800', '900']; ?>

@srpatel
Copy link

srpatel commented Jan 2, 2020

For PHP, you should be using $ to prefix variables (@ is used for class variables in Ruby, and is not a Haml-specific thing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants