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.
-
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>
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
}
}
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.
- koara / koara-java-html: Koara to Html renderer written in Java
- koara / koara-java-xml: Koara to Xml renderer written in Java