@textlint/markdown-to-ast

  • Version 16.1.3
  • Published
  • 480 kB
  • 1 dependency
  • MIT license

Install

npm i @textlint/markdown-to-ast
yarn add @textlint/markdown-to-ast
pnpm add @textlint/markdown-to-ast

Overview

Parse Markdown to AST with location info.

Index

Functions

Type Aliases

Functions

function parse

parse: (text: string, options?: ParseOptions) => TxtDocumentNode;
  • parse Markdown text and return ast mapped location info.

    Parameter text

    Parameter options

Type Aliases

type ParseOptions

type ParseOptions = {
/**
* Recognize emphasis, strong emphasis, and strikethrough next to CJK punctuation,
* as the CommonMark CJK-friendly Amendments define.
* https://github.com/tats-u/markdown-cjk-friendly/blob/main/specification.md
* @default false
*/
cjkFriendlyEmphasis?: boolean;
};
  • Options of parse. Each option enables an extension that changes how a syntax is recognized.

Package Files (2)

Dependencies (1)

Dev Dependencies (6)

Peer Dependencies (0)

No peer dependencies.

Badge

To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@textlint/markdown-to-ast.

  • Markdown
    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@textlint/markdown-to-ast)
  • HTML
    <a href="https://www.jsdocs.io/package/@textlint/markdown-to-ast"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>