diff options
| author | Igor Minar | 2010-12-07 16:07:14 -0800 |
|---|---|---|
| committer | Igor Minar | 2010-12-07 16:07:14 -0800 |
| commit | 809ca94e1cca45fbf40a2bfd84e8770536e3624b (patch) | |
| tree | 7bbd100acf147ec514b6a60612e60df85960f2a2 /docs | |
| parent | 824eab9029ea2fe36b167523c58d455a009d5064 (diff) | |
| download | angular.js-809ca94e1cca45fbf40a2bfd84e8770536e3624b.tar.bz2 | |
@returns tag should allow the content to be split into multiple lines
Diffstat (limited to 'docs')
| -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(){ |
