diff options
| author | Vojta Jina | 2011-11-11 16:40:43 -0800 | 
|---|---|---|
| committer | Igor Minar | 2011-11-13 16:40:31 -0800 | 
| commit | 4afad1da299cadf6761604d42ceb069158201170 (patch) | |
| tree | 62fb752d6ce6a2938cd83a40055710ce8aec9ad4 /docs/spec/ngdocSpec.js | |
| parent | eb01fe593de3f8f2328f54ad4044cd8da679cfc8 (diff) | |
| download | angular.js-4afad1da299cadf6761604d42ceb069158201170.tar.bz2 | |
feat(docs): allow custom attributes on <doc:source>
Allow any attributes, not only jsfiddle...
Diffstat (limited to 'docs/spec/ngdocSpec.js')
| -rw-r--r-- | docs/spec/ngdocSpec.js | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/docs/spec/ngdocSpec.js b/docs/spec/ngdocSpec.js index 72ad69ff..367f91b4 100644 --- a/docs/spec/ngdocSpec.js +++ b/docs/spec/ngdocSpec.js @@ -89,6 +89,14 @@ describe('ngdoc', function() {              '<pre class="doc-source">\n<>\n</pre></doc:example><p>after</p>');        }); +      it('should preserve the source attribute', function() { +        var doc = new Doc('@description before <doc:example>' + +            '<doc:source source="false">lala</doc:source></doc:example> after'); +        doc.parse(); +        expect(doc.description).toContain('<p>before </p><doc:example>' + +            '<pre class="doc-source" source="false">lala</pre></doc:example><p>after</p>'); +      }); +        it('should preserve the jsfiddle attribute', function() {          var doc = new Doc('@description before <doc:example>' +              '<doc:source jsfiddle="foo">lala</doc:source></doc:example> after'); | 
