- Notifications
You must be signed in to change notification settings - Fork0
[CONSTRUCTING] reStructuredText parser and renderer.
License
frantic1048/Est
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
reStructuredText parser and renderer.
Use yarn to fetch the package, or npm if you prefer.
yarn add @frantic1048/Est
After build:
// do not forget the ``@frantic1048`` scopeimportestfrom'@frantic1048/Est'// directly render rST into HTML stringconsthtml=est.rst2html('reStructuredText string...')// or...?// welcome to the dark side...// generate parsing tree// which is an ASTy instanceconstparse_t=est.parse('reStructuredText string...')// transfrom parsing tree into doc tree// which is an ASTy instanceconstdoc_t=est.transfrom(parse_t)// render the doc tree into HTML stringconsthtml_the_harder_way=est.render(doc_t)
All node types of the parsed tree can be found fromest.TokenTypes
.
The node structure of a specific markup could be referred intest/grammar.<MarkupName>.js
Render function is under constructing.
Prepare:
# fetch source codegit clone https://github.com/frantic1048/Est.git# fetch dependenciesyarn
Build and run test:
yarn ci
Production build:
yarn dist
Develop:
yarn dev
The build output is underlib
folder. All possible files are:
est.dev.js: | trace on, CommonJS module, debug and develop oriented. |
---|---|
est.min.js: | trace off, single variable, Browser oriented. |
est.js: | trace off, CommonJS module, Node.js oriented. |
Inline: |
|
---|---|
Block-level: |
|
About
[CONSTRUCTING] reStructuredText parser and renderer.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.