mirror of
https://github.com/remy/inliner.git
synced 2024-09-11 17:25:30 +03:00
parent
701bf13678
commit
0ae1301641
@ -343,7 +343,8 @@ function removeComments(element, $) {
|
|||||||
var i = nodes.length;
|
var i = nodes.length;
|
||||||
|
|
||||||
while (i--) {
|
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();
|
$(nodes[i]).remove();
|
||||||
}
|
}
|
||||||
removeComments(nodes[i], $);
|
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