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

remark-math

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-math - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

7

index.d.ts
/**
* Plugin to support math.
*
* @type {import('unified').Plugin<void[], Root>}
* @type {import('unified').Plugin<[Options?] | void[], Root, Root>}
*/
export default function remarkMath():
export default function remarkMath(
options?: void | import('mdast-util-math').ToOptions | undefined
):
| void
| import('unified').Transformer<import('mdast').Root, import('mdast').Root>
export type Root = import('mdast').Root
export type Options = import('mdast-util-math').ToOptions
export type DoNotTouchAsThisImportIncludesMathInTree =
typeof import('mdast-util-math')
/**
* @typedef {import('mdast').Root} Root
* @typedef {import('mdast-util-math').ToOptions} Options
*

@@ -13,10 +14,10 @@ * @typedef {import('mdast-util-math')} DoNotTouchAsThisImportIncludesMathInTree

*
* @type {import('unified').Plugin<void[], Root>}
* @type {import('unified').Plugin<[Options?] | void[], Root, Root>}
*/
export default function remarkMath() {
export default function remarkMath(options = {}) {
const data = this.data()
add('micromarkExtensions', math)
add('fromMarkdownExtensions', mathFromMarkdown)
add('toMarkdownExtensions', mathToMarkdown)
add('micromarkExtensions', math(options))
add('fromMarkdownExtensions', mathFromMarkdown())
add('toMarkdownExtensions', mathToMarkdown(options))

@@ -23,0 +24,0 @@ /**

{
"name": "remark-math",
"version": "5.0.0",
"version": "5.1.0",
"description": "remark plugin to parse and stringify math",

@@ -39,4 +39,4 @@ "license": "MIT",

"@types/mdast": "^3.0.0",
"mdast-util-math": "^1.0.0",
"micromark-extension-math": "^1.0.0",
"mdast-util-math": "^2.0.0",
"micromark-extension-math": "^2.0.0",
"unified": "^10.0.0"

@@ -43,0 +43,0 @@ },

@@ -91,2 +91,11 @@ # remark-math

##### `options`
###### `options.singleDollarTextMath`
Whether to support math (text) with a single dollar (`boolean`, default:
`true`).
Single dollars work in Pandoc and many other places, but often interfere with
“normal” dollars in text.
#### Notes

@@ -93,0 +102,0 @@

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