Skip to content

Commit 13dbe90

Browse files
committed
Merge pull request #12 from leipert/feature/lazyload-ascii2mathml
Lazy Load ascii2mathml
2 parents b930e8a + 068a9f9 commit 13dbe90

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
'use strict';
44

5-
var ascii2mathml = require('ascii2mathml');
5+
var ascii2mathml = null;
66
require('./lib/polyfills');
77

88

@@ -214,6 +214,9 @@ function makeMath_block(open, close) {
214214
}
215215

216216
function makeMathRenderer(options) {
217+
if (ascii2mathml === null) {
218+
ascii2mathml = require('ascii2mathml');
219+
}
217220
var mathml = ascii2mathml(Object.assign({}, options));
218221

219222
return options && options.display === 'block' ?

0 commit comments

Comments
 (0)