fix: mathjax timeout + external link icons

This commit is contained in:
NGPixel
2017-07-09 15:13:42 -04:00
parent 9d090ab392
commit 62ca6e55b3
11 changed files with 19 additions and 42 deletions

View File

@@ -1,5 +1,7 @@
'use strict'
/* global winston */
const Promise = require('bluebird')
const md = require('markdown-it')
const mdEmoji = require('markdown-it-emoji')
@@ -123,7 +125,6 @@ mathjax.config({
}
}
})
mathjax.start()
/**
* Parse markdown content and build TOC tree
@@ -331,12 +332,14 @@ const processMathjax = (content) => {
format: mode.format,
speakText: false,
svg: true,
state: mathjaxState
state: mathjaxState,
timeout: 30 * 1000
}, result => {
if (!result.errors) {
resolve(result.svg)
} else {
reject(new Error(result.errors.join(', ')))
resolve(currentMatch[0])
winston.warn(result.errors.join(', '))
}
})
})