0.0.17 • Published 3 years ago

md2jsonml-core v0.0.17

Weekly downloads
17
License
ISC
Repository
-
Last release
3 years ago

md2jsonml-core

npm

Using mark-twain to convert markdown to jsonMl

Getting Started

npm i md2jsonml-core

Usage

const MT = require('md2jsonml-core');
const fs = require('fs');
const jsonML = MT(fs.readFileSync('readme.md','utf-8');

其返回值为 jsonMl

{
  // YAML will be parsed as meta data.
  meta: {
    title: 'Title',
    ...
  },

  // Others will be parsed as JsonML.
  content:  [
    "article",
    ["h1", "Here is a heading"],
    [
      "ol",
      [
        "li",
        [
          "p",
          "First"
        ]
      ],
      ...
    ],
    [
      "p",
      "This is a paragraph, including ",
      [
        "em",
        "EM"
      ],
      " and ",
      [
        "strong",
        "STRONG"
      ],
      ". Any question? Oh, I almost forget ",
      [
        "code",
        "inline code"
      ],
      "."
    ],
    ...
  ]
}

License

MIT

0.0.16

3 years ago

0.0.17

3 years ago

0.0.14

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.10

3 years ago

0.0.10-alpha.0

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.4

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago