Add another test for ignoreCustomFragments
authorJuriy Zaytsev <kangax@gmail.com>
Sun, 25 Oct 2015 15:38:32 +0000 (16:38 +0100)
committerJuriy Zaytsev <kangax@gmail.com>
Sun, 25 Oct 2015 15:38:32 +0000 (16:38 +0100)
tests/minifier.js

index 8a87b6e..accf8bf 100644 (file)
       ]
     }), input);
 
+    input = '<div' +
+              '{{IF text}}' +
+              'data-yashareDescription="{{shorted(text, 300)}}"' +
+              '{{END IF}}></div>';
+    equal(minify(input, {
+      ignoreCustomFragments: [
+        /\{\{[\s\S]*?\}\}/g
+      ],
+      caseSensitive: true
+    }), input);
   });
 
   test('bootstrap\'s span > button > span', function() {