markdown-it-mathjax-node
Advanced tools
Comparing version
2
a.js
@@ -22,4 +22,4 @@ // { svg: true, ex: 8, cjkCharWidth: 18, linebreaks: true }, | ||
console.log(md.render("$a_i e^2$")); | ||
console.log(md.render("$$a_i e^2$$")); | ||
// console.log(md.render("$$40,2$$")); | ||
// .use(require('markdown-it-math') [, options = { svg: true, ex: 8, cjkCharWidth: 18, linebreaks: true }]); |
12
index.js
@@ -229,10 +229,6 @@ /* Process inline math */ | ||
// console.log(renderingOptions.display) | ||
return mathml.typeset(conf, function (data) { | ||
if (!data.errors) { | ||
// console.log(data.svg) | ||
// console.log(yourMath) | ||
// console.log() | ||
return data.svg + '\n'; | ||
} | ||
}); | ||
let {svg} = deasyncPromise(mathml.typeset(conf)); | ||
// console.log(typeof svg) | ||
return svg + '\n'; | ||
// return mathml.typeset(renderingOptions,) + '\n'; | ||
@@ -239,0 +235,0 @@ } : |
{ | ||
"name": "markdown-it-mathjax-node", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "Markdown-it plugin to include math in your document", | ||
@@ -15,3 +15,3 @@ "main": "index.js", | ||
"minify": "uglifyjs dist/markdown-it-math.js -b beautify=false,ascii_only=true -c -m --preamble \"/*! ${npm_package_name} ${npm_package_version} ${npm_package_homepage} @license MIT */\" > dist/markdown-it-math.min.js", | ||
"pretest": "npm run lint", | ||
@@ -18,0 +18,0 @@ "test": "mocha" |
97053
-0.12%2091
-0.24%