How to use the @textlint/markdown-to-ast.Syntax function in @textlint/markdown-to-ast

To help you get started, we’ve selected a few @textlint/markdown-to-ast examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github thlorenz / doctoc / lib / transform.js View on Github external
.map(function (x) {
        if (x.type === md.Syntax.Link) {
          return extractText(x);
        }
        else if (x.type === md.Syntax.Image) {
          // Images (at least on GitHub, untested elsewhere) are given a hyphen
          // in the slug. We can achieve this behavior by adding an '*' to the
          // TOC entry. Think of it as a "magic char" that represents the iamge.
          return '*';
        }
        else {
          return x.raw;
        }
      })
      .join('')
github thlorenz / doctoc / lib / transform.js View on Github external
.filter(function (x) {
      return x.type === md.Syntax.Header;
    })
    .map(function (x) {
github thlorenz / doctoc / lib / get-html-headers.js View on Github external
.filter(function(node) {
      return node.type === md.Syntax.HtmlBlock || node.type === md.Syntax.Html;
    })
    .map(function (node) {

@textlint/markdown-to-ast

Parse Markdown to AST with location info.

MIT
Latest version published 2 months ago

Package Health Score

92 / 100
Full package analysis

Popular @textlint/markdown-to-ast functions

Similar packages