1.0.2 • Published 7 years ago

remark-bobril v1.0.2

Weekly downloads
6
License
MIT
Repository
github
Last release
7 years ago

remark-bobril

Plugin to compile Markdown to Bobril using Remark.

Prerequisites

For more information, please check: unified

Installation

  • npm install remark-bobril

Programmatic usage in browser

 import * as remark from 'remark';
 import * as remarkBobril 'remark-bobril';

 const markdown = '## Hello world';
 
 remark()
    .use(remarkBobril)
    .process(markdown, (_err, bobrilDom) => {
            const result = JSON.stringify(bobrilDom.contents);
            
            console.log(result);
          }
        );

The generated content of variable result is:

{
  tag: 'div',
  children: [
    {
      tag: 'h2',
      children: [
        'Hello world'
      ]
    }
  ]
}

As you can see, there is on more wrapper div element in the result than you can expect. This root element is always generated.

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.1

7 years ago