Skip to content

koara/koara-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Koara

Build Status Coverage Status Maven Central License

Koara-java

Koara is a modular lightweight markup language. This project is the core koara parser written in Java.
If you are interested in converting koara to a specific outputFormat, please look the Related Projects section.

Getting started

  • Download JAR file

  • Gradle

    dependencies {
      compile "com.codeaddslife.koara:koara:0.15.0"
    }
  • Maven

    <dependency>
      <groupId>com.codeaddslife.koara</groupId>
      <artifactId>koara</artifactId>
      <version>0.15.0</version>
    </dependency>

Usage

package demo;

import java.io.File;
import java.io.IOException;
import Parser;
import Document;

public class App {

	public static void main(String[] args) throws IOException {
		Parser parser = new Parser();
		Document result1 = parser.parse("Hello World!"); // parse a string
		Document result2 = parser.parseFile(new File("hello.kd")); // parse a file
	}
	
}

Configuration

You can configure the Parser:

  • parser.setModules(String... modules)
    Default: {"paragraphs", "headings", "lists", "links", "images", "formatting", "blockquotes", "code"}

    Specify which parts of the syntax are allowed to be parsed. The rest will render as plain text.

Related Projects