mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
@returns description should support markdown
This commit is contained in:
parent
4c69d694d7
commit
dd687e2bf5
2 changed files with 6 additions and 1 deletions
|
|
@ -213,7 +213,7 @@ function returnsTag(doc, name, value) {
|
|||
if (match) {
|
||||
var tag = {
|
||||
type: match[1],
|
||||
description: match[2] || false
|
||||
description: markdownNoP(match[2]) || false
|
||||
};
|
||||
} else {
|
||||
throw "[" + doc.raw.file + ":" + doc.raw.line +
|
||||
|
|
|
|||
|
|
@ -170,6 +170,11 @@ describe('collect', function(){
|
|||
TAG.returns(doc, 'returns', '{string} 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(){
|
||||
|
|
|
|||
Loading…
Reference in a new issue