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

"Unclosed string at position: 2955" error processing moment.js Hebrew locale configuration #68

Closed
acerix opened this issue Nov 4, 2017 · 2 comments

Comments

@acerix
Copy link

acerix commented Nov 4, 2017

This examples causes an error "Unclosed string at position: 2955", referring to "יי" in the regex of the isPM function.

\JShrink\Minifier::minify(file_get_contents('https://raw.githubusercontent.com/moment/moment/develop/locale/he.js'));

I don't know any Hebrew, but as far as I can tell, the regex is valid.

@acerix
Copy link
Author

acerix commented Nov 7, 2017

Here's a simplified example with part of the regex from the script that is causing an error:

\JShrink\Minifier::minify('/^(")$/');

@acerix
Copy link
Author

acerix commented Nov 15, 2017

As far as I can tell, the problem is that JShrink processes scripts one byte at a time and therefore has problems with scripts containing multi-byte chars.

http://php.net/manual/en/book.mbstring.php

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

No branches or pull requests

2 participants