diff options
| author | Igor Minar | 2010-11-17 17:26:25 -0800 |
|---|---|---|
| committer | Igor Minar | 2010-11-18 02:35:29 -0800 |
| commit | 65989c6f0d13b8f205ab929999a4b9f66c8c1c93 (patch) | |
| tree | c7a2e05a696c6cdf9f9f296730aadb8303c960f1 /docs/spec/collectSpec.js | |
| parent | 4491bbdede825df78302301d4689dd73bcf9c256 (diff) | |
| download | angular.js-65989c6f0d13b8f205ab929999a4b9f66c8c1c93.tar.bz2 | |
add support for {@link} tags within @description and remove implicit linking
use as:
- foo {@link bar}
- foo {@link bar desc}
I'm removing implicit linking because it unintentionally links stuff and
generally interferes with other conversions. We have to link stuff explicitely
from now on.
Diffstat (limited to 'docs/spec/collectSpec.js')
| -rw-r--r-- | docs/spec/collectSpec.js | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/docs/spec/collectSpec.js b/docs/spec/collectSpec.js index 822e97fb..f6b5a319 100644 --- a/docs/spec/collectSpec.js +++ b/docs/spec/collectSpec.js @@ -13,11 +13,11 @@ describe('collect', function(){ }); it('should not replace anything in <pre>', function(){ - expect(collect.markdown('angular.x\n<pre>\nangular.k\n</pre>\nangular.x')). + expect(collect.markdown('bah x\n<pre>\nangular.k\n</pre>\n asdf x')). toEqual( - '<p><a href="#!angular.x">angular.x</a></p>' + + '<p>bah x</p>' + '<pre>\nangular.k\n</pre>' + - '<p><a href="#!angular.x">angular.x</a></p>'); + '<p>asdf x</p>'); }); }); @@ -196,6 +196,18 @@ describe('collect', function(){ '<div ng:non-bindable><pre class="brush: js; html-script: true;">cba</pre></div>'); }); + + it('should support nested @link annotations with or without description', function() { + TAG.description(doc, 'description', + 'foo {@link angular.foo}\n\n da {@link angular.foo bar foo bar } \n\n' + + 'dad{@link angular.foo}\n\n' + + '{@link angular.directive.ng:foo ng:foo}'); + expect(doc.description). + toBe('<p>foo <a href="#!angular.foo"><code>angular.foo</code></a></p>\n\n' + + '<p>da <a href="#!angular.foo"><code>bar foo bar</code></a> </p>\n\n' + + '<p>dad<a href="#!angular.foo"><code>angular.foo</code></a></p>\n\n' + + '<p><a href="#!angular.directive.ng:foo"><code>ng:foo</code></a></p>'); + }); }); describe('@example', function(){ |
