From b6bc6c2ddf1ae1523ec7e4cb92db209cd6501181 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Fri, 29 Apr 2011 14:43:43 -0700 Subject: fix syntax highlighting on the javascript --- docs/src/ngdoc.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'docs/src/ngdoc.js') diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js index 875b24df..57202809 100644 --- a/docs/src/ngdoc.js +++ b/docs/src/ngdoc.js @@ -70,7 +70,12 @@ Doc.prototype = { parts.forEach(function(text, i){ if (text.match(/^
/)) {
text = text.replace(/^([\s\S]*)<\/pre>/mi, function(_, content){
- return '' +
+ var clazz = 'brush: js;'
+ if (content.match(/\<\w/)) {
+ // we are HTML
+ clazz += ' html-script: true;';
+ }
+ return '' +
content.replace(//g, '>') +
'';
});
--
cgit v1.2.3