'use strict';

var nch = require('noncharacters');
var through = require('through2');

module.exports = function () {
  return function (options) {
    return through.obj(function (file, enc, cb) {
      var str = file.contents.toString();
      str = str.replace(/\{%%[=-]?(\s*)([\s\S]*?)(\s*)=%}/g, '\uFFFF$1$2$3\uFFFE');

      file.contents = new Buffer(str);
      this.push(file);
      cb();
    });
  }
};
@@ -298,28 +298,34 @@
 /g, 
-'%5CuFFFF$1$2$3%5CuFFFE'
+nch%5B0%5D + '$1$2$3' + nch%5B1%5D
 );%0A%0A
@@ -409,11 +409,12 @@
  %7D);%0A  %7D
+;
 %0A%7D;

use non-characters