Skip to content

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

Open
@wunc

Description

@wunc

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>

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions