Markdown for dialog projects
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.babelrc
.editorconfig
.flowconfig
.gitignore
.npmignore
LICENSE
README.md
circle.yml
package-lock.json
package.json

README.md

Markdown

Build Status

Markdown for dialog projects

Installation

npm install --save @dlghq/markdown

Usage

import { parse, decorators } from '@dlghq/markdown';

console.log(parse('Hello, *world*!', decorators)); // AST

AST for above example would be

[
  {
    "type": "paragraph",
    "content": [
      {
        "type": "text",
        "content": "Hello, "
      },
      {
        "type": "text",
        "content": "world",
        "highlight": "bold"
      },
      {
        "type": "text",
        "content": "!"
      }
    ]
  }
]

License

Apache-2.0