gatsby-remark-katex
Advanced tools
Comparing version 1.1.0-alpha.3f307d61 to 1.1.0-alpha.5182142b
21
index.js
@@ -1,11 +0,11 @@ | ||
"use strict"; | ||
const visit = require(`unist-util-visit`); | ||
var visit = require(`unist-util-visit`); | ||
var katex = require(`katex`); | ||
var remarkMath = require(`remark-math`); | ||
const katex = require(`katex`); | ||
module.exports = function (_ref) { | ||
var markdownAST = _ref.markdownAST; | ||
const remarkMath = require(`remark-math`); | ||
visit(markdownAST, `inlineMath`, function (node) { | ||
module.exports = ({ | ||
markdownAST | ||
}) => { | ||
visit(markdownAST, `inlineMath`, node => { | ||
node.type = `html`; | ||
@@ -16,4 +16,3 @@ node.value = katex.renderToString(node.value, { | ||
}); | ||
visit(markdownAST, `math`, function (node) { | ||
visit(markdownAST, `math`, node => { | ||
node.type = `html`; | ||
@@ -26,4 +25,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.1.0-alpha.3f307d61", | ||
"version": "1.1.0-alpha.5182142b", | ||
"author": "Jeffrey Xiao <jeffrey.xiao1998@gmail.com>", | ||
"dependencies": { | ||
"babel-runtime": "^6.26.0", | ||
"@babel/runtime": "^7.0.0-beta.38", | ||
"katex": "^0.8.3", | ||
@@ -21,9 +21,11 @@ "remark-math": "^0.2.4", | ||
"scripts": { | ||
"build": "babel src --out-dir . --ignore __tests__", | ||
"watch": "babel -w src --out-dir . --ignore __tests__", | ||
"build": "babel src --out-dir . --ignore **/__tests__/**", | ||
"watch": "babel -w src --out-dir . --ignore **/__tests__/**", | ||
"prepublish": "cross-env NODE_ENV=production npm run build" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.0.0-beta.38", | ||
"@babel/core": "^7.0.0-beta.38", | ||
"cross-env": "^5.0.5" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10836
3
61
+ Added@babel/runtime@7.26.0(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
- Removedbabel-runtime@^6.26.0
- Removedbabel-runtime@6.26.0(transitive)
- Removedcore-js@2.6.12(transitive)
- Removedregenerator-runtime@0.11.1(transitive)