From ef22968810d555f78d3bbf7b5428757690c8cc70 Mon Sep 17 00:00:00 2001 From: Matias Niemelä Date: Thu, 6 Jun 2013 01:28:50 -0400 Subject: feat(ngdocs): support popover, foldouts and foldover annotations --- docs/spec/ngdocSpec.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'docs/spec/ngdocSpec.js') 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( + "
\n//!annotate supertext\n
\n
" + ) + ).toContain('data-popover data-content="supertext"') + }); + + it('should allow for a custom regular expression for matching', function() { + expect(new Doc().markdown( + "
\n//!annotate=\"soon\" supertext\n

soon

\n
" + ) + ).toContain('data-popover data-content="supertext" data-title="Info">soon') + }); + + it('should allow for a custom title to be set', function() { + expect(new Doc().markdown( + "
\n//!annotate=\"soon\" coming soon|supertext\n

soon

\n
" + ) + ).toContain('data-popover data-content="supertext" data-title="coming soon">soon') + }); + }); }); describe('trim', function() { -- cgit v1.2.3