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

minifier hangs on parsing errors caused by angular brace mismatch #177

Closed
jrencz opened this issue May 26, 2014 · 2 comments
Closed

minifier hangs on parsing errors caused by angular brace mismatch #177

jrencz opened this issue May 26, 2014 · 2 comments

Comments

@jrencz
Copy link

jrencz commented May 26, 2014

After parsing tags with missing right angular brace like this:

<foo bar="1" baz</foo>

Parse error is thrown but parsing time is not always the same. For some attributes (especially attributes with dashes and used with without the value what is common when angular attribute directives are used) parser tends to hang for several seconds and even several minutes sometime.

I use html-minifier via the ngtemplates grunt plugin. I already discussed the problem with @ericclemmons and we both think the problem is closer to the minifier itself than the grunt plugin.

Cold you please take a look at ericclemmons/grunt-angular-templates#91 where I described the problem and minifier settings in detail?

@kangax
Copy link
Owner

kangax commented Jun 1, 2014

I'll mark this as "possible feature" in a sense that we might consider optimizing parser to report these errors sooner. I have a feeling this could be caused by catastrophic backtracking and is common when giving certain input to certain parsers. If anyone has time to look into it, I'll gladly consider merging this in.

@alexlamsl
Copy link
Collaborator

I think this is fixed by #510 - please reopen if that's not the case.

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

3 participants