@returns description should support markdown

This commit is contained in:
Igor Minar 2010-11-17 12:52:45 -08:00
parent 4c69d694d7
commit dd687e2bf5
2 changed files with 6 additions and 1 deletions

View file

@ -213,7 +213,7 @@ function returnsTag(doc, name, value) {
if (match) { if (match) {
var tag = { var tag = {
type: match[1], type: match[1],
description: match[2] || false description: markdownNoP(match[2]) || false
}; };
} else { } else {
throw "[" + doc.raw.file + ":" + doc.raw.line + throw "[" + doc.raw.file + ":" + doc.raw.line +

View file

@ -170,6 +170,11 @@ describe('collect', function(){
TAG.returns(doc, 'returns', '{string} descrip tion'); TAG.returns(doc, 'returns', '{string} descrip tion');
expect(doc.returns).toEqual({type: 'string', description: 'descrip tion'}); expect(doc.returns).toEqual({type: 'string', description: 'descrip tion'});
}); });
it('should transform description of @returns with markdown', function() {
TAG.returns(doc, 'returns', '{string} descrip *tion*');
expect(doc.returns).toEqual({type: 'string', description: 'descrip <em>tion</em>'});
});
}); });
describe('@description', function(){ describe('@description', function(){