mirror of
https://github.com/remy/inliner.git
synced 2024-08-16 20:00:35 +03:00
parent
701bf13678
commit
0ae1301641
@ -343,7 +343,8 @@ function removeComments(element, $) {
|
||||
var i = nodes.length;
|
||||
|
||||
while (i--) {
|
||||
if (nodes[i].type === 'comment' && nodes[i].nodeValue.indexOf('[') !== 0) {
|
||||
var first = (nodes[i].nodeValue || '').charAt(0);
|
||||
if (nodes[i].type === 'comment' && first !== '[' && first !== '#') {
|
||||
$(nodes[i]).remove();
|
||||
}
|
||||
removeComments(nodes[i], $);
|
||||
|
1
test/fixtures/ssi.result.html
vendored
Normal file
1
test/fixtures/ssi.result.html
vendored
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html> <html> <head> <title>just a demo</title> </head> <body> <!--#include virtual="/includes/head.html"--> </body> </html>
|
10
test/fixtures/ssi.src.html
vendored
Normal file
10
test/fixtures/ssi.src.html
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>just a demo</title>
|
||||
</head>
|
||||
<body>
|
||||
<!--#include virtual="/includes/head.html"-->
|
||||
<!-- but this should be removed -->
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user