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

PHP minifier breaks PHP file when single line comments are present #56

Open
JacksonChen666 opened this issue Aug 11, 2021 · 0 comments
Open

Comments

@JacksonChen666
Copy link

Single line comments (like below) in php

// a single line comment
nextStatement();

gets minified without being manipulated and turn into

// a single line comment nextStatement();

breaking the rest of the PHP file.

Screenshot (224kb) (left side is not minified, and the right side is minified but with changes that break the PHP file due to single line comments)

Original PHP file (external)

Workaround:

A workaround for not letting comments break the rest of the file is to use /* multi-line (or 'C' style) comments instead */

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

1 participant