diff options
| -rw-r--r-- | docs/collect.js | 2 | ||||
| -rw-r--r-- | docs/spec/collectSpec.js | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/docs/collect.js b/docs/collect.js index e2f3b940..e1af14ef 100644 --- a/docs/collect.js +++ b/docs/collect.js @@ -208,7 +208,7 @@ function propertyTag(doc, name, value) { } function returnsTag(doc, name, value) { - var match = value.match(/^{(\S+)}\s+(.*)?/); + var match = value.match(/^{(\S+)}\s+([\s\S]*)?/); if (match) { var tag = { diff --git a/docs/spec/collectSpec.js b/docs/spec/collectSpec.js index 86af0810..f0783bdf 100644 --- a/docs/spec/collectSpec.js +++ b/docs/spec/collectSpec.js @@ -182,6 +182,12 @@ describe('collect', function(){ TAG.returns(doc, 'returns', '{string} descrip *tion*'); expect(doc.returns).toEqual({type: 'string', description: 'descrip <em>tion</em>'}); }); + + it('should support multiline content', function() { + TAG.returns(doc, 'returns', '{string} description\n new line\n another line'); + expect(doc.returns). + toEqual({type: 'string', description: 'description\n new line\n another line'}); + }); }); describe('@description', function(){ |
