Skip to content

[Bug]: Syntax error with backslashes in inline JS code #329

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

Open
wunc opened this issue Mar 10, 2025 · 1 comment
Open

[Bug]: Syntax error with backslashes in inline JS code #329

wunc opened this issue Mar 10, 2025 · 1 comment
Assignees
Labels

Comments

@wunc
Copy link

wunc commented Mar 10, 2025

Extension Version

1.0.3

PHP Binary

Valet

Operating System

macOS

What happened?

Certain inline JS code in a blade file with double backslashes throws an error in the Laravel extension when the file is parsed. I think possibly it's specifically two backslashes before a quote? ( e.g. \\" ).

2025-03-10 14:44:11.642 [error] /bin/sh: -c: line 1: syntax error near unexpected token `)'
/bin/sh: -c: line 1: `    console.log(\"App\\\\" + \"Something\");'

Mimimal Code Sample

<script>
    console.log("App\\" + "Something");
</script>
@N1ebieski
Copy link
Contributor

#326

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

No branches or pull requests

3 participants