Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 705404f

Browse files
committed
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.
1 parent 00f784c commit 705404f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

docs/components/angular-bootstrap/bootstrap-prettify.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,12 @@ directive.prettyprint = ['reindentCode', function(reindentCode) {
102102
//ensure that angular won't compile {{ curly }} values
103103
html = html.replace(/\{\{/g, '<span>{{</span>')
104104
.replace(/\}\}/g, '<span>}}</span>');
105-
element.html(window.prettyPrintOne(reindentCode(html), undefined, true));
105+
if (window.RUNNING_IN_NG_TEST_RUNNER) {
106+
element.html(html);
107+
}
108+
else {
109+
element.html(window.prettyPrintOne(reindentCode(html), undefined, true));
110+
}
106111
}
107112
};
108113
}];

docs/src/templates/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
addTag('script', {src: path('angular-animate.js') }, sync);
5555
addTag('script', {src: 'components/angular-bootstrap.js' }, sync);
5656
addTag('script', {src: 'components/angular-bootstrap-prettify.js' }, sync);
57-
addTag('script', {src: 'components/google-code-prettify.js' }, sync);
5857
if (!window.RUNNING_IN_NG_TEST_RUNNER) {
58+
addTag('script', {src: 'components/google-code-prettify.js' }, sync);
5959
addTag('script', {src: 'components/' + (debug ? 'lunr.js' : 'lunr.min.js') }, sync);
6060
}
6161
addTag('script', {src: 'components/marked.js' }, sync);

0 commit comments

Comments
 (0)