diff options
| author | Di Peng | 2011-08-19 12:06:59 -0700 |
|---|---|---|
| committer | Igor Minar | 2011-08-19 13:29:26 -0700 |
| commit | ac6e1306ec2126f9c8e67b4a26d8f03001abf73d (patch) | |
| tree | ce76b6bda2e7ce8b6eeb8b67dc26b54a2ff40622 /docs/src/ngdoc.js | |
| parent | e004378d100ce767a1107180102790a9a360644e (diff) | |
| download | angular.js-ac6e1306ec2126f9c8e67b4a26d8f03001abf73d.tar.bz2 | |
fix(sample): Fix for jsFiddle integration
Diffstat (limited to 'docs/src/ngdoc.js')
| -rw-r--r-- | docs/src/ngdoc.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js index 91c4662a..8fcf3cd5 100644 --- a/docs/src/ngdoc.js +++ b/docs/src/ngdoc.js @@ -111,9 +111,11 @@ Doc.prototype = { '</pre></div>'; }); } else if (isDocWidget('example')) { - text = text.replace(/(<doc:source>)([\s\S]*)(<\/doc:source>)/mi, - function(_, before, content, after){ - return '<pre class="doc-source">' + htmlEscape(content) + '</pre>'; + text = text.replace(/<doc:source(\s+jsfiddle="[^"]+")?>([\s\S]*)<\/doc:source>/mi, + function(_, jsfiddle, content){ + return '<pre class="doc-source"' + (jsfiddle || '') +'>' + + htmlEscape(content) + + '</pre>'; }); text = text.replace(/(<doc:scenario>)([\s\S]*)(<\/doc:scenario>)/mi, function(_, before, content, after){ |
