aboutsummaryrefslogtreecommitdiffstats
path: root/docs/src/ngdoc.js
diff options
context:
space:
mode:
authorDi Peng2011-08-19 12:06:59 -0700
committerIgor Minar2011-08-19 15:27:21 -0700
commit774db0aecb85f9ae79895046b62ea4c45bad8bff (patch)
tree21f74df17b91a3b8998bec350f6d24b1ccd296b1 /docs/src/ngdoc.js
parentdc0b0c77c7ba3e419442ec639356ab5d3ba7efbe (diff)
downloadangular.js-774db0aecb85f9ae79895046b62ea4c45bad8bff.tar.bz2
fix(sample): Fix for jsFiddle integration
Diffstat (limited to 'docs/src/ngdoc.js')
-rw-r--r--docs/src/ngdoc.js8
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){