src/main/java/j2html/utils/JSMin.java
public void jsmin() throws IOException, UnterminatedRegExpLiteralException, UnterminatedCommentException, UnterminatedStringLiteralException {
        theA = '\n';
        action(3);
        while (theA != EOF) {
            switch (theA) {
                case ' ':
                    if (isAlphanum(theB)) {
                        action(1);
                    } else {
                        action(2);
                    }
                    break;
                case '\n':
                    switch (theB) {
                        case '{':
                        case '[':
                        case '(':
                        case '+':
                        case '-':
                            action(1);
                            break;
                        case ' ':
                            action(3);
                            break;
                        default:
                            if (isAlphanum(theB)) {
                                action(1);
                            } else {
                                action(2);
                            }
                    }
                    break;
                default:
                    switch (theB) {
                        case ' ':
                            if (isAlphanum(theA)) {
                                action(1);
                                break;
                            }
                            action(3);
                            break;
                        case '\n':
                            switch (theA) {
                                case '}':
                                case ']':
                                case ')':
                                case '+':
                                case '-':
                                case '"':
                                case '\'':
                                    action(1);
                                    break;
                                default:
                                    if (isAlphanum(theA)) {
                                        action(1);
                                    } else {
                                        action(3);
                                    }
                            }
                            break;
                        default:
                            action(1);
                            break;
                    }
            }
        }
        out.flush();
    }
public void jsmin() throws IOException, UnterminatedRegExpLiteralException, UnterminatedCommentException, UnterminatedStringLiteralException {
        theA = '\n';
        action(3);
        while (theA != EOF) {
            switch (theA) {
                case ' ':
                    if (isAlphanum(theB)) {
                        action(1);
                    } else {
                        action(2);
                    }
                    break;
                case '\n':
                    switch (theB) {
                        case '{':
                        case '[':
                        case '(':
                        case '+':
                        case '-':
                            action(1);
                            break;
                        case ' ':
                            action(3);
                            break;
                        default:
                            if (isAlphanum(theB)) {
                                action(1);
                            } else {
                                action(2);
                            }
                    }
                    break;
                default:
                    switch (theB) {
                        case ' ':
                            if (isAlphanum(theA)) {
                                action(1);
                                break;
                            }
                            action(3);
                            break;
                        case '\n':
                            switch (theA) {
                                case '}':
                                case ']':
                                case ')':
                                case '+':
                                case '-':
                                case '"':
                                case '\'':
                                    action(1);
                                    break;
                                default:
                                    if (isAlphanum(theA)) {
                                        action(1);
                                    } else {
                                        action(3);
                                    }
                            }
                            break;
                        default:
                            action(1);
                            break;
                    }
            }
        }
        out.flush();
    }
public void jsmin ( ) throws IOException , UnterminatedRegExpLiteralException , UnterminatedCommentException , UnterminatedStringLiteralException { theA = ' ' ; action ( 3 ) ; while ( theA != EOF ) { switch ( theA ) { case ' ' : if ( isAlphanum ( theB ) ) { action ( 1 ) ; } else { action ( 2 ) ; } break ; case ' ' : switch ( theB ) { case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : action ( 1 ) ; break ; case ' ' : action ( 3 ) ; break ; default : if ( isAlphanum ( theB ) ) { action ( 1 ) ; } else { action ( 2 ) ; } } break ; default : switch ( theB ) { case ' ' : if ( isAlphanum ( theA ) ) { action ( 1 ) ; break ; } action ( 3 ) ; break ; case ' ' : switch ( theA ) { case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : action ( 1 ) ; break ; default : if ( isAlphanum ( theA ) ) { action ( 1 ) ; } else { action ( 3 ) ; } } break ; default : action ( 1 ) ; break ; } } } out . flush ( ) ; }
jsmin -- Copy the input to the output, deleting the characters which are
insignificant to JavaScript. Comments will be removed. Tabs will be
replaced with spaces. Carriage returns will be replaced with linefeeds.
Most spaces and linefeeds will be removed.
jsmin -- Copy the input to the output deleting the characters which are insignificant to JavaScript . Comments will be removed . Tabs will be replaced with spaces . Carriage returns will be replaced with linefeeds . Most spaces and linefeeds will be removed .