Skip to content
This repository was archived by the owner on Apr 20, 2025. It is now read-only.

honkit/honkit-light-parsers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HonKit Light Parsers

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

Parser Repository
Markdown honkit/markdown-legacy
AsciiDoc honkit/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) {

});

About

lightweight honkit SUMMARY/glossary/page parser module

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 3

  •  
  •  
  •