diff --git a/index.js b/index.js
index 7b4ef13..4134c11 100644
--- a/index.js
+++ b/index.js
@@ -6,7 +6,7 @@ var Promise = require('bluebird'),
module.exports = function (html, options) {
return new Promise(function (resolve, reject) {
- var opt = extend({
+ var opt = extend(true, {
extraCss: '',
applyStyleTags: true,
removeStyleTags: true,
diff --git a/test/expected/codeblocks-external.html b/test/expected/codeblocks-external.html
new file mode 100644
index 0000000..73a6a99
--- /dev/null
+++ b/test/expected/codeblocks-external.html
@@ -0,0 +1,6 @@
+
+
+
+ <>
+
+
diff --git a/test/fixtures/codeblocks-external.html b/test/fixtures/codeblocks-external.html
new file mode 100644
index 0000000..73a6a99
--- /dev/null
+++ b/test/fixtures/codeblocks-external.html
@@ -0,0 +1,6 @@
+
+
+
+ <>
+
+
diff --git a/test/main.js b/test/main.js
index 8294a69..65f3fb6 100644
--- a/test/main.js
+++ b/test/main.js
@@ -284,4 +284,14 @@ describe('inline-css', function() {
};
compare(path.join('test', 'fixtures', 'ejs.html'), path.join('test', 'expected', 'ejs.html'), options, done);
});
+
+ it('Should ignore user defined code blocks', function(done) {
+ var options = {
+ xmlMode: true,
+ codeBlocks: {
+ craze: { start: '<<', end: '>>' }
+ }
+ };
+ compare(path.join('test', 'fixtures', 'codeblocks-external.html'), path.join('test', 'expected', 'codeblocks-external.html'), options, done);
+ });
});