mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-10 07:44:43 +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) {
|
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 +
|
||||||
|
|
|
||||||
|
|
@ -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(){
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue