diff --git a/test/dox.test.js b/test/dox.test.js index c6bc1824..d3e49cdc 100644 --- a/test/dox.test.js +++ b/test/dox.test.js @@ -963,4 +963,14 @@ module.exports = { done(); }); }, + + 'test that quotes within regexpes are correctly handled': function (done) { + fixture('regexp.js', function (err, str){ + var comments = dox.parseComments(str); + comments.length.should.equal(2); + comments[0].description.full.should.equal("
A
"); + comments[1].description.full.should.equal("B
"); + done(); + }); + }, }; diff --git a/test/fixtures/regexp.js b/test/fixtures/regexp.js new file mode 100644 index 00000000..0bf5dbe1 --- /dev/null +++ b/test/fixtures/regexp.js @@ -0,0 +1,12 @@ +/** + * A + */ +function a() { + /'"/; +}; + +/** + * B + */ +function b() { +};