Skip to content
/ coradoc Public
forked from metanorma/coradoc

Coradoc is the Core AsciiDoc Parser used by Metanorma

License

Notifications You must be signed in to change notification settings

hmdne/coradoc

 
 

Repository files navigation

Coradoc

Coradoc is a modern Parser for Asciidoc document. It defines a grammar for AsciiDoc, and then build the Parser for that grammar.

Once the document is parsed, it provides a pure ruby object Coradoc::Document, which can used to customize the document in easiest way.

Installation

Add this line to your application's Gemfile:

gem "coradoc"

And then execute:

bundle install

Or install it yourself as:

gem install coradoc

Development

We are following Sandi Metz's Rules for this gem, you can read the description of the rules here All new code should follow these rules. If you make changes in a pre-existing file that violates these rules you should fix the violations as part of your contribution.

Setup

Clone the repository.

git clone https://github.com/metanorma/coradoc.git

Setup your environment in docker

make setup

Run the test suite

make test

Usages

Parsing a document

To parse any AsciiDoc, we can use the following:

Coradoc::Parser.parse(sample_asciidoc)

This interface will return the abstract syntax tree.

About

Coradoc is the Core AsciiDoc Parser used by Metanorma

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 98.9%
  • Other 1.1%