diff options
| author | Matias Niemelä | 2013-06-06 01:28:50 -0400 | 
|---|---|---|
| committer | Misko Hevery | 2013-06-17 22:00:54 -0700 | 
| commit | ef22968810d555f78d3bbf7b5428757690c8cc70 (patch) | |
| tree | 1a19f2649e07406bd1988c4d915deec87073c568 /docs/spec | |
| parent | 07ef1667db632d0fd75472f30343255edcebf43b (diff) | |
| download | angular.js-ef22968810d555f78d3bbf7b5428757690c8cc70.tar.bz2 | |
feat(ngdocs): support popover, foldouts and foldover annotations
Diffstat (limited to 'docs/spec')
| -rw-r--r-- | docs/spec/ngdocSpec.js | 22 | 
1 files changed, 22 insertions, 0 deletions
| diff --git a/docs/spec/ngdocSpec.js b/docs/spec/ngdocSpec.js index 9eed24ca..7a038e89 100644 --- a/docs/spec/ngdocSpec.js +++ b/docs/spec/ngdocSpec.js @@ -196,6 +196,28 @@ describe('ngdoc', function() {      }); +    describe('inline annotations', function() { +      it('should convert inline docs annotations into proper HTML', function() { +        expect(new Doc().markdown( +          "<pre>\n//!annotate supertext\n<br />\n</pre>" +          ) +        ).toContain('data-popover data-content="supertext"') +      }); + +      it('should allow for a custom regular expression for matching', function() { +        expect(new Doc().markdown( +          "<pre>\n//!annotate=\"soon\" supertext\n<p>soon</p>\n</pre>" +          ) +        ).toContain('data-popover data-content="supertext" data-title="Info">soon</div>') +      }); + +      it('should allow for a custom title to be set', function() { +        expect(new Doc().markdown( +          "<pre>\n//!annotate=\"soon\" coming soon|supertext\n<p>soon</p>\n</pre>" +          ) +        ).toContain('data-popover data-content="supertext" data-title="coming soon">soon</div>') +      }); +    });    });    describe('trim', function() { | 
