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
With the following HTML and default options:
<script>document.write('Hello, ')</script><script>document.write('World!')</script>
It should produce:
<script>document.write('Hello, ');document.write('World!');</script>
But instead you get the following error:
Error: SyntaxError: Unexpected token: name (document)
So it appears that it is concatenating the two <script> tags as this (without a semicolon in between):
<script>document.write('Hello, ')document.write('World!')</script>
If you put the semicolon there yourself, mergeScripts does something even stranger. It replaces it with a comma:
mergeScripts
<script>document.write('Hello, ');</script><script>document.write('World!')</script>
becomes
<script>document.write('Hello, '),document.write('World!');</script>
The comma is valid, but it does seem an odd choice over a semicolon.
The text was updated successfully, but these errors were encountered:
Fix issue when merging <script> without leading ; #55
391bbe5
Thanks for the bug report! I fixed it. I'll release a new version today.
Sorry, something went wrong.
Actually, that is a result of minifyJs optimization. If you disable it ; shouldn't be replaced with , in that case.
minifyJs
;
,
Released: 0.1.10.
No branches or pull requests
With the following HTML and default options:
It should produce:
But instead you get the following error:
So it appears that it is concatenating the two <script> tags as this (without a semicolon in between):
If you put the semicolon there yourself,
mergeScripts
does something even stranger. It replaces it with a comma:becomes
The comma is valid, but it does seem an odd choice over a semicolon.
The text was updated successfully, but these errors were encountered: