Merge branch 'master' into js-default-options

This commit is contained in:
Liam Newman 2018-10-08 10:22:36 -07:00 committed by GitHub
commit 9418c9eafb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 44 additions and 43 deletions

View File

@ -276,4 +276,4 @@
</script>
</body>
</html>
</html>

View File

@ -639,4 +639,4 @@ function logToStdout(str, config) {
if (typeof config.quiet === "undefined" || !config.quiet) {
console.log(str);
}
}
}

View File

@ -59,4 +59,4 @@ Directives.prototype.readIgnored = function(input) {
};
module.exports.Directives = Directives;
module.exports.Directives = Directives;

View File

@ -145,4 +145,4 @@ InputScanner.prototype.lookBack = function(testVal) {
};
module.exports.InputScanner = InputScanner;
module.exports.InputScanner = InputScanner;

View File

@ -175,4 +175,4 @@ function _normalizeOpts(options) {
module.exports.Options = Options;
module.exports.normalizeOpts = _normalizeOpts;
module.exports.mergeOpts = _mergeOpts;
module.exports.mergeOpts = _mergeOpts;

View File

@ -306,4 +306,4 @@ Output.prototype.ensure_empty_line_above = function(starts_with, ends_with) {
}
};
module.exports.Output = Output;
module.exports.Output = Output;

View File

@ -51,4 +51,4 @@ function Token(type, text, newlines, whitespace_before) {
}
module.exports.Token = Token;
module.exports.Token = Token;

View File

@ -149,4 +149,4 @@ Tokenizer.prototype._readWhitespace = function() {
module.exports.Tokenizer = Tokenizer;
module.exports.TOKEN = TOKEN;
module.exports.TOKEN = TOKEN;

View File

@ -75,4 +75,4 @@ TokenStream.prototype.add = function(token) {
this.__tokens_length += 1;
};
module.exports.TokenStream = TokenStream;
module.exports.TokenStream = TokenStream;

View File

@ -435,4 +435,4 @@ Beautifier.prototype.beautify = function() {
return sweetCode;
};
module.exports.Beautifier = Beautifier;
module.exports.Beautifier = Beautifier;

View File

@ -37,4 +37,4 @@ function css_beautify(source_text, options) {
}
module.exports = css_beautify;
module.exports.defaultOptions = new Options();
module.exports.defaultOptions = new Options();

View File

@ -43,4 +43,4 @@ Options.prototype = new BaseOptions();
module.exports.Options = Options;
module.exports.Options = Options;

View File

@ -26,4 +26,4 @@
SOFTWARE.
*/
'use strict';
'use strict';

View File

@ -740,4 +740,4 @@ Beautifier.prototype._do_optional_end_element = function(parser_token) {
};
module.exports.Beautifier = Beautifier;
module.exports.Beautifier = Beautifier;

View File

@ -37,4 +37,4 @@ function style_html(html_source, options, js_beautify, css_beautify) {
}
module.exports = style_html;
module.exports.defaultOptions = new Options();
module.exports.defaultOptions = new Options();

View File

@ -79,4 +79,4 @@ Options.prototype = new BaseOptions();
module.exports.Options = Options;
module.exports.Options = Options;

View File

@ -285,4 +285,4 @@ Tokenizer.prototype._read_content_word = function() {
};
module.exports.Tokenizer = Tokenizer;
module.exports.TOKEN = TOKEN;
module.exports.TOKEN = TOKEN;

View File

@ -41,4 +41,4 @@ style_html.defaultOptions = html_beautify.defaultOptions;
module.exports.js = js_beautify;
module.exports.css = css_beautify;
module.exports.html = style_html;
module.exports.html = style_html;

View File

@ -53,4 +53,4 @@ exports.newline = /[\n\r\u2028\u2029]/;
// in javascript, these two differ
// in python they are the same, different methods are called on them
exports.lineBreak = new RegExp('\r\n|' + exports.newline.source);
exports.allLineBreaks = new RegExp(exports.lineBreak.source, 'g');
exports.allLineBreaks = new RegExp(exports.lineBreak.source, 'g');

View File

@ -1407,4 +1407,4 @@ Beautifier.prototype.handle_eof = function(current_token) {
this.handle_whitespace_and_comments(current_token);
};
module.exports.Beautifier = Beautifier;
module.exports.Beautifier = Beautifier;

View File

@ -37,4 +37,4 @@ function js_beautify(js_source_text, options) {
}
module.exports = js_beautify;
module.exports.defaultOptions = new Options();
module.exports.defaultOptions = new Options();

View File

@ -90,4 +90,4 @@ Options.prototype = new BaseOptions();
module.exports.Options = Options;
module.exports.Options = Options;

View File

@ -538,4 +538,4 @@ Tokenizer.prototype._read_string_recursive = function(delimiter, allow_unescaped
module.exports.Tokenizer = Tokenizer;
module.exports.TOKEN = TOKEN;
module.exports.positionable_operators = positionable_operators.slice();
module.exports.line_starters = line_starters.slice();
module.exports.line_starters = line_starters.slice();

View File

@ -129,4 +129,4 @@ var JavascriptObfuscator = {
}
};
};

View File

@ -116,4 +116,4 @@ var MyObfuscate = {
}
};
};

View File

@ -108,4 +108,4 @@ var P_A_C_K_E_R = {
}
};
};

View File

@ -101,4 +101,4 @@ var Urlencoded = {
if (isNode) {
module.exports = Urlencoded;
}
}

View File

@ -62,4 +62,4 @@ if (require.main === module) {
exit = exit || amd_beautifier_index_tests('html-beautifier', run_html_tests);
process.exit(exit);
}
}

View File

@ -63,4 +63,4 @@ describe('IndexScanner', function() {
});
});
});

View File

@ -42,4 +42,4 @@ function node_beautifier_html_tests() {
if (require.main === module) {
process.exit(node_beautifier_html_tests());
}
}

View File

@ -51,4 +51,4 @@ function node_beautifier_html_tests() {
if (require.main === module) {
process.exit(node_beautifier_html_tests());
}
}

View File

@ -51,4 +51,4 @@ function node_beautifier_tests() {
if (require.main === module) {
process.exit(node_beautifier_tests());
}
}

View File

@ -75,4 +75,4 @@ if (require.main === module) {
exit = exit || node_beautifier_bundle_tests('html-beautifier', run_html_tests);
process.exit(exit);
}
}

View File

@ -47,4 +47,4 @@ if (require.main === module) {
exit = exit || node_beautifier_index_tests('html-beautifier', run_html_tests);
process.exit(exit);
}
}

View File

@ -143,4 +143,4 @@ function SanityTest(func, name_of_test) {
if (typeof module !== 'undefined' && module.exports) {
module.exports = SanityTest;
}
}

View File

@ -2,6 +2,7 @@
"indent_size": 2,
"indent_char": " ",
"indent_level": 0,
"end-with-newline": true,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 10,

View File

@ -1167,4 +1167,4 @@ exports.test_data = {
}
]
};
};

View File

@ -2509,4 +2509,4 @@ exports.test_data = {
}, {
name: "New Test Suite"
}]
};
};

View File

@ -81,4 +81,4 @@ var operator_position = {
module.exports = {
operator_position: operator_position
};
};

View File

@ -3561,4 +3561,4 @@ exports.test_data = {
output: "" //string or array of lines
}]
}]
};
};

View File

@ -276,4 +276,4 @@ function submitIssue() {
console.log(url);
window.open(url, '_blank').focus();
}
}

View File

@ -114,4 +114,4 @@ h2 {
margin-bottom: 0;
font-size: 20px;
font-weight: normal;
}
}

View File

@ -7,4 +7,4 @@ var _gaq = [
s = d.getElementsByTagName(t)[0];
g.src = '//www.google-analytics.com/ga.js';
s.parentNode.insertBefore(g, s);
}(document, 'script'));
}(document, 'script'));

View File

@ -49,4 +49,4 @@ $(function() {
$('#additional-options').change(beautify);
});
});