Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-remark-katex

Package Overview
Dependencies
Maintainers
2
Versions
338
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-remark-katex - npm Package Compare versions

Comparing version 1.1.0-alpha.6ab84875 to 1.1.0-alpha.6ad61a13

7

index.js
const visit = require(`unist-util-visit`);
const katex = require(`katex`);
const remarkMath = require(`remark-math`);
module.exports = ({
markdownAST
}) => {
module.exports = ({ markdownAST }) => {
visit(markdownAST, `inlineMath`, node => {

@@ -16,2 +12,3 @@ node.type = `html`;

});
visit(markdownAST, `math`, node => {

@@ -18,0 +15,0 @@ node.type = `html`;

{
"name": "gatsby-remark-katex",
"description": "Transform math nodes to html markup",
"version": "1.1.0-alpha.6ab84875",
"version": "1.1.0-alpha.6ad61a13",
"author": "Jeffrey Xiao <jeffrey.xiao1998@gmail.com>",
"bugs": {
"url": "https://github.com/gatsbyjs/gatsby/issues"
},
"dependencies": {
"@babel/runtime": "^7.0.0-beta.38",
"@babel/runtime": "^7.0.0-beta.42",
"katex": "^0.8.3",
"remark-math": "^0.2.4",
"remark-math": "^1.0.3",
"unist-util-visit": "^1.1.1"
},
"devDependencies": {
"cross-env": "^5.1.4"
},
"homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-remark-katex#readme",
"keywords": [
"gatsby",
"gatsby-plugin",
"remark",
"katex"
"katex",
"remark"
],
"license": "MIT",
"main": "index.js",
"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-remark-katex",
"scripts": {
"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"
"build": "babel src --out-dir . --ignore __tests__",
"prepublish": "cross-env NODE_ENV=production npm run build",
"watch": "babel -w src --out-dir . --ignore __tests__"
}
}

@@ -16,3 +16,3 @@ const Remark = require(`remark`)

it(`renders math node properly`, () => {
it(`renders double $ inlineMath node properly`, () => {
const equation = `$$a^2 + b^2 = c^2$$`

@@ -27,2 +27,13 @@ let remark = new Remark()

})
it(`renders math node properly`, () => {
const equation = `$$\na^2 + b^2 = c^2\n$$`
let remark = new Remark()
for (let parserPlugins of plugin.setParserPlugins()) {
remark = remark.use(parserPlugins)
}
const markdownAST = remark.parse(equation)
plugin({ markdownAST })
expect(markdownAST).toMatchSnapshot()
})
})

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc