diff options
| author | Igor Minar | 2013-08-16 10:53:18 -0700 |
|---|---|---|
| committer | Igor Minar | 2013-08-16 11:01:16 -0700 |
| commit | 705404ff8e3187dcc23b1fbafd60a67eaca26c7d (patch) | |
| tree | 4016ff9b6f016639afd440f52da2b913b0396568 /docs | |
| parent | 00f784cda8e128d2ee31a84e71b04941bdd48d79 (diff) | |
| download | angular.js-705404ff8e3187dcc23b1fbafd60a67eaca26c7d.tar.bz2 | |
chore(ngdocs): disable code prettification in e2e tests
code prettification is expensive and not needed for e2e tests, so I'm disabling
it to speed up the e2e test suite.
this is a temporary measure, see previous commit for more info.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/components/angular-bootstrap/bootstrap-prettify.js | 7 | ||||
| -rw-r--r-- | docs/src/templates/index.html | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/docs/components/angular-bootstrap/bootstrap-prettify.js b/docs/components/angular-bootstrap/bootstrap-prettify.js index 9d8a7d23..169d232b 100644 --- a/docs/components/angular-bootstrap/bootstrap-prettify.js +++ b/docs/components/angular-bootstrap/bootstrap-prettify.js @@ -102,7 +102,12 @@ directive.prettyprint = ['reindentCode', function(reindentCode) { //ensure that angular won't compile {{ curly }} values html = html.replace(/\{\{/g, '<span>{{</span>') .replace(/\}\}/g, '<span>}}</span>'); - element.html(window.prettyPrintOne(reindentCode(html), undefined, true)); + if (window.RUNNING_IN_NG_TEST_RUNNER) { + element.html(html); + } + else { + element.html(window.prettyPrintOne(reindentCode(html), undefined, true)); + } } }; }]; diff --git a/docs/src/templates/index.html b/docs/src/templates/index.html index 1deb08e1..4807019a 100644 --- a/docs/src/templates/index.html +++ b/docs/src/templates/index.html @@ -54,8 +54,8 @@ addTag('script', {src: path('angular-animate.js') }, sync); addTag('script', {src: 'components/angular-bootstrap.js' }, sync); addTag('script', {src: 'components/angular-bootstrap-prettify.js' }, sync); - addTag('script', {src: 'components/google-code-prettify.js' }, sync); if (!window.RUNNING_IN_NG_TEST_RUNNER) { + addTag('script', {src: 'components/google-code-prettify.js' }, sync); addTag('script', {src: 'components/' + (debug ? 'lunr.js' : 'lunr.min.js') }, sync); } addTag('script', {src: 'components/marked.js' }, sync); |
