diff options
| author | Misko Hevery | 2011-04-29 14:43:43 -0700 | 
|---|---|---|
| committer | Igor Minar | 2011-06-06 22:28:37 -0700 | 
| commit | b6bc6c2ddf1ae1523ec7e4cb92db209cd6501181 (patch) | |
| tree | 7c3415a03732bdfc3ac630143936b2d31df91c82 /docs/src/ngdoc.js | |
| parent | ea6b87c24ba70d2554c0f9a3e80b245dc3780234 (diff) | |
| download | angular.js-b6bc6c2ddf1ae1523ec7e4cb92db209cd6501181.tar.bz2 | |
fix syntax highlighting on the javascript
Diffstat (limited to 'docs/src/ngdoc.js')
| -rw-r--r-- | docs/src/ngdoc.js | 7 | 
1 files changed, 6 insertions, 1 deletions
| 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(/^<pre>/)) {          text = text.replace(/^<pre>([\s\S]*)<\/pre>/mi, function(_, content){ -          return '<div ng:non-bindable><pre class="brush: js; html-script: true;">' + +          var clazz = 'brush: js;' +          if (content.match(/\<\w/)) { +            // we are HTML +            clazz += ' html-script: true;'; +          } +          return '<div ng:non-bindable><pre class="' + clazz +'">' +                    content.replace(/</g, '<').replace(/>/g, '>') +                   '</pre></div>';          }); | 
