1.0.2 • Published 6 months ago

@honkit/light-parsers v1.0.2

Weekly downloads
-
License
Apache 2
Repository
github
Last release
6 months ago

HonKit Light Parsers

This node module unify the interface to use parsers. It's a light (simplified) implementation of parsers for HonKit:

ParserRepository
Markdownhonkit/markdown-legacy
AsciiDochonkit/asciidoc

How to use it?

This module can be used in node.js

Installation

npm install @honkit/light-parsers

Usage

import honkitParsers from '@honkit/light-parsers';
Get a parser for a file:
var parser = gitbookParsers.getForFile("FILE.md");
Use this parser:

Parse the summary:

parser.summary("* [An entry](./test.md)")
.then(function(summary) {

});

Parse the glossary:

parser.glossary("...")
.then(function(glossary) {

});

Parse the languages index:

parser.langs("...")
.then(function(languages) {

});

Parse a page to html:

parser.page("...")
.then(function(sections) {

});
1.0.2

6 months ago

1.0.0

6 months ago