Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

micromark-extension-math-inline

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micromark-extension-math-inline

Micromark extension for inline math syntax (:math[...])

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
17
-15%
Maintainers
1
Weekly downloads
 
Created
Source

micromark-extension-math-inline

micromark extension for inline math syntax (:math[...]).

Install

npm install micromark-extension-math-inline

Usage

import { micromark } from 'micromark'
import { mathInline } from 'micromark-extension-math-inline'

const html = micromark(':math[E = mc^2]', {
  extensions: [mathInline()]
})

Tokens

  • mathInline — The whole construct
  • mathInlineMarker — The :math[ opener and ] closer
  • mathInlineData — The math content

Syntax

  • Starts with :math[ (no whitespace allowed)
  • Ends with ] (with bracket balancing)
  • Cannot span multiple lines
  • Must not be preceded by a word character (a-z, A-Z, 0-9, _)

Escaping

  • \] → escaped ] (doesn't close)
  • \\ → escaped \
  • \[ → escaped [ (doesn't affect bracket depth)

License

MIT

Keywords

micromark

FAQs

Package last updated on 27 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts