Skip to content

koara/koara-rb-html

Repository files navigation

Koara

Build Status Coverage Status Gem License

Koara-rb-html

Koara is a modular lightweight markup language. This project can render the koara AST to Html in Ruby. The AST is created by the core koara parser.

Getting started

gem install koara-html

Usage

require 'koara'
require 'koara/html'

parser = Koara::Parser.new
result = parser.parse('Hello World!')
renderer = Koara::Html::Html5Renderer.new
result.accept(renderer)
puts renderer.output

Configuration

You can configure the Renderer:

  • renderer.partial
    Default: true

    When false, the output will be wrapped with a <html> and <body> tag to make a complete Html document.