Output -- > instead of --> in expressions. Escape <!-- and --> within string literals.

This commit is contained in:
kzc
2015-10-12 00:20:42 -04:00
committed by Mihai Bazon
parent a8e67d157e
commit 9f1f21b810
2 changed files with 26 additions and 2 deletions

View File

@@ -0,0 +1,15 @@
html_comment_in_expression: {
input: {
function f(a, b, x, y) { return a < !--b && x-- > y; }
}
expect_exact: "function f(a,b,x,y){return a< !--b&&x-- >y}";
}
html_comment_in_string_literal: {
input: {
function f() { return "<!--HTML-->comment in<!--string literal-->"; }
}
expect_exact: 'function f(){return"\\x3c!--HTML--\\x3ecomment in\\x3c!--string literal--\\x3e"}';
}