gatsby-remark-katex
Advanced tools
Comparing version 1.0.3 to 1.1.0-alpha.22c8a6f1
18
index.js
"use strict"; | ||
var visit = require(`unist-util-visit`); | ||
var katex = require(`katex`); | ||
var remarkMath = require(`remark-math`); | ||
const visit = require(`unist-util-visit`); | ||
const katex = require(`katex`); | ||
const remarkMath = require(`remark-math`); | ||
module.exports = function (_ref) { | ||
var markdownAST = _ref.markdownAST; | ||
visit(markdownAST, `inlineMath`, function (node) { | ||
module.exports = ({ markdownAST }) => { | ||
visit(markdownAST, `inlineMath`, node => { | ||
node.type = `html`; | ||
@@ -17,3 +15,3 @@ node.value = katex.renderToString(node.value, { | ||
visit(markdownAST, `math`, function (node) { | ||
visit(markdownAST, `math`, node => { | ||
node.type = `html`; | ||
@@ -26,4 +24,2 @@ node.value = katex.renderToString(node.value, { | ||
module.exports.setParserPlugins = function () { | ||
return [remarkMath]; | ||
}; | ||
module.exports.setParserPlugins = () => [remarkMath]; |
{ | ||
"name": "gatsby-remark-katex", | ||
"description": "Transform math nodes to html markup", | ||
"version": "1.0.3", | ||
"version": "1.1.0-alpha.22c8a6f1", | ||
"author": "Jeffrey Xiao <jeffrey.xiao1998@gmail.com>", | ||
@@ -6,0 +6,0 @@ "dependencies": { |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
9975
60
2