@returns tag should allow the content to be split into multiple lines

This commit is contained in:
Igor Minar 2010-12-07 16:07:14 -08:00
parent 824eab9029
commit 809ca94e1c
2 changed files with 7 additions and 1 deletions

View file

@ -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 = {

View file

@ -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(){