aboutsummaryrefslogtreecommitdiffstats
path: root/docs/src/templates/doc_widgets.js
diff options
context:
space:
mode:
authorMisko Hevery2011-01-19 15:42:11 -0800
committerMisko Hevery2011-01-24 14:23:51 -0800
commitc2f2587a79aeb77aad66f081cf924a79348a698e (patch)
tree8f5aa4cc6e7189befb834388b2102d1eda88a975 /docs/src/templates/doc_widgets.js
parent5d0d34ae72a9ca47f1b2dabda60711ad16ee9313 (diff)
downloadangular.js-c2f2587a79aeb77aad66f081cf924a79348a698e.tar.bz2
fixed example rendering, add tests for it.
Diffstat (limited to 'docs/src/templates/doc_widgets.js')
-rw-r--r--docs/src/templates/doc_widgets.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/src/templates/doc_widgets.js b/docs/src/templates/doc_widgets.js
index 18aeeacb..2d1ab8c6 100644
--- a/docs/src/templates/doc_widgets.js
+++ b/docs/src/templates/doc_widgets.js
@@ -1,5 +1,5 @@
(function(){
-
+
var angularJsUrl;
var scripts = document.getElementsByTagName("script");
var filename = /(.*\/)angular([^\/]*)/;
@@ -10,7 +10,7 @@
}
}
-
+
var HTML_TEMPLATE =
'<!doctype html>\n' +
'<html xmlns:ng="http://angularjs.org">\n' +
@@ -32,15 +32,15 @@
var tabs = angular.element(
'<ul class="doc-example">' +
'<li class="doc-example-heading"><h3>Source</h3></li>' +
- '<li class="doc-example-source" ng:non-bindable>' +
- '<pre class="brush: js; html-script: true; highlight: [' +
+ '<li class="doc-example-source" ng:non-bindable>' +
+ '<pre class="brush: js; html-script: true; highlight: [' +
code.hilite + ']; toolbar: false;"></pre></li>' +
'<li class="doc-example-heading"><h3>Live Preview</h3></li>' +
'<li class="doc-example-live">' + exampleSrc +'</li>' +
'<li class="doc-example-heading"><h3>Scenario Test</h3></li>' +
'<li class="doc-example-scenario"><pre class="brush: js">' + scenario.text() + '</pre></li>' +
'</ul>');
-
+
tabs.find('li.doc-example-source > pre').text(HTML_TEMPLATE.replace('_HTML_SOURCE_', code.html));
element.html('');
@@ -54,7 +54,7 @@
alert(e);
}
});
-
+
function indent(text) {
var lines = text.split(/\n/);
var lineNo = [];
@@ -66,5 +66,5 @@
}
return {html: lines.join('\n'), hilite: lineNo.join(',') };
};
-
-})(); \ No newline at end of file
+
+})();