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/spec/ngdocSpec.js | 8 ++++---- docs/src/ngdoc.js | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/spec/ngdocSpec.js b/docs/spec/ngdocSpec.js index 46b05aef..68d3700f 100644 --- a/docs/spec/ngdocSpec.js +++ b/docs/spec/ngdocSpec.js @@ -307,10 +307,10 @@ describe('ngdoc', function(){ describe('@description', function(){ it('should support pre blocks', function(){ - var doc = new Doc("@description
abc"); + var doc = new Doc("@description
abc"); doc.parse(); expect(doc.description). - toBe('
abc
<b>abc</b>
foo
' + - 'abc
abc
foo
' + - 'cba
cba
/)) {
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