Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

[CONSTRUCTING] reStructuredText parser and renderer.

License

NotificationsYou must be signed in to change notification settings

frantic1048/Est

Repository files navigation

Est

licensecode qualitycidm

reStructuredText parser and renderer.

Install

Use yarn to fetch the package, or npm if you prefer.

yarn add @frantic1048/Est

Usage

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.

Build

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.

Recognized Markups

Inline:
Block-level:

About

[CONSTRUCTING] reStructuredText parser and renderer.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp