Skip to content

Script that breaks JSMin #53

Closed
sembrestels opened this Issue Feb 14, 2013 · 3 comments

3 participants

@sembrestels

Event calendar Elgg plugin can't be minified because JSMin throws an 500 error when try to minify fullcalendar script:

https://raw.github.com/lorea/event_calendar/master/views/default/js/event_calendar/fullcalendar.php

I tried to debug it without success.

@Paperback

I had issues with a few javascript files causing a 500 error as well; although it might be different issues.
Minify sometimes has false positives on regex and causes an error

http://code.google.com/p/minify/wiki/CommonProblems

@mrclay
Owner
mrclay commented Apr 1, 2013

I think this is the failure case:

setOuterHeight(
    eventElement,
    slotHeight * Math.round(
        (event.end ? ((event.end - event.start) / MINUTE_MS) : opt('defaultEventMinutes'))
            / opt('slotMinutes')
    )
);

JSMin sees / opt... as the start of a regexp.

@mrclay mrclay closed this in 6f5721d Apr 1, 2013
@sembrestels

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.