From 55ce859998ad1f34ae84175cbb322fd8ce498970 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Tue, 22 Feb 2011 14:48:53 -0800 Subject: fix documentation for ie --- docs/src/ngdoc.js | 4 ++-- docs/src/templates/doc_widgets.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/src') 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(/^/)) { text = text.replace(/()([\s\S]*)(<\/doc:source>)/mi, function(_, before, content, after){ - return before + htmlEscape(content) + after; + return '
' + htmlEscape(content) + '
'; }); text = text.replace(/()([\s\S]*)(<\/doc:scenario>)/mi, function(_, before, content, after){ self.scenarios.push(content); - return before + htmlEscape(content) + after; + return '
' + htmlEscape(content) + '
'; }); } else { text = text.replace(//gm, '<angular/>'); 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(); -- cgit v1.2.3