Skip to content

Commit

Permalink
Add test for issue with <style> and <script> tags formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseGoncalves committed Sep 12, 2014
1 parent 597a68a commit 9abe378
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions js/test/beautify-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1978,6 +1978,19 @@ function run_beautifier_tests(test_obj, Urlencoded, js_beautify, html_beautify,
opts.preserve_newlines = false;
bth('<div>\n\tfoo\n</div>', '<div>foo</div>');

opts.unformatted = ['script', 'style'];
bth('<script id="javascriptTemplate" type="text/x-kendo-template">\n' +
' <ul>\n' +
' # for (var i = 0; i < data.length; i++) { #\n' +
' <li>#= data[i] #</li>\n' +
' # } #\n' +
' </ul>\n' +
'</script>');
bth('<style>\n' +
' body {background-color:lightgrey}\n' +
' h1 {color:blue}\n' +
'</style>');

opts.preserve_newlines = true;
bth('<div>\n\tfoo\n</div>');

Expand Down

0 comments on commit 9abe378

Please sign in to comment.