aboutsummaryrefslogtreecommitdiffstats
path: root/docs/src
diff options
context:
space:
mode:
authorMisko Hevery2011-02-22 14:48:53 -0800
committerMisko Hevery2011-02-22 14:48:53 -0800
commit55ce859998ad1f34ae84175cbb322fd8ce498970 (patch)
treea7f5fd27183c65b538d1483d67903a7f7570da28 /docs/src
parent5a3c9190dc0ed037ffca73db61404ff0f3ef2675 (diff)
downloadangular.js-55ce859998ad1f34ae84175cbb322fd8ce498970.tar.bz2
fix documentation for ie
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/ngdoc.js4
-rw-r--r--docs/src/templates/doc_widgets.js8
2 files changed, 6 insertions, 6 deletions
diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js
index 93d5c43e..2f59f044 100644
--- a/docs/src/ngdoc.js
+++ b/docs/src/ngdoc.js
@@ -77,12 +77,12 @@ Doc.prototype = {
} else if (text.match(/^<doc:example>/)) {
text = text.replace(/(<doc:source>)([\s\S]*)(<\/doc:source>)/mi,
function(_, before, content, after){
- return before + htmlEscape(content) + after;
+ return '<pre class="doc-source">' + htmlEscape(content) + '</pre>';
});
text = text.replace(/(<doc:scenario>)([\s\S]*)(<\/doc:scenario>)/mi,
function(_, before, content, after){
self.scenarios.push(content);
- return before + htmlEscape(content) + after;
+ return '<pre class="doc-scenario">' + htmlEscape(content) + '</pre>';
});
} else {
text = text.replace(/<angular\/>/gm, '<tt>&lt;angular/&gt;</tt>');
diff --git a/docs/src/templates/doc_widgets.js b/docs/src/templates/doc_widgets.js
index e811ff0c..a21fc5e1 100644
--- a/docs/src/templates/doc_widgets.js
+++ b/docs/src/templates/doc_widgets.js
@@ -2,7 +2,7 @@
var angularJsUrl;
var scripts = document.getElementsByTagName("script");
- var angularJsRegex = /^(|.*\/)angular(-.*?)?(\.min)?.js(\?[^#]*)?(#(.*))?$/
+ var angularJsRegex = /^(|.*\/)angular(-.*?)?(\.min)?.js(\?[^#]*)?(#(.*))?$/;
for(var j = 0; j < scripts.length; j++) {
var src = scripts[j].src;
if (src && src.match(angularJsRegex)) {
@@ -25,9 +25,9 @@
this.descend(true); //compile the example code
element.hide();
- var example = element.find('doc\\:source').eq(0),
+ var example = element.find('pre.doc-source').eq(0),
exampleSrc = example.text(),
- scenario = element.find('doc\\:scenario').eq(0);
+ scenario = element.find('pre.doc-scenario').eq(0);
var code = indent(exampleSrc);
var tabHtml =
@@ -63,7 +63,7 @@
function indent(text) {
if (!text) return text;
- var lines = text.split(/\n/);
+ var lines = text.split(/[\n|\r]/);
var lineNo = [];
// remove any leading blank lines
while (lines[0].match(/^\s*$/)) lines.shift();