koara-html

Koara to Html parser written in Java

License

License

GroupId

GroupId

io.koara
ArtifactId

ArtifactId

koara-html
Last Version

Last Version

0.14.0
Release Date

Release Date

Type

Type

jar
Description

Description

koara-html
Koara to Html parser written in Java
Source Code Management

Source Code Management

https://github.com/koara/koara-java-html.git

Download koara-html

How to add to project

<!-- https://jarcasting.com/artifacts/io.koara/koara-html/ -->
<dependency>
    <groupId>io.koara</groupId>
    <artifactId>koara-html</artifactId>
    <version>0.14.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.koara/koara-html/
implementation 'io.koara:koara-html:0.14.0'
// https://jarcasting.com/artifacts/io.koara/koara-html/
implementation ("io.koara:koara-html:0.14.0")
'io.koara:koara-html:jar:0.14.0'
<dependency org="io.koara" name="koara-html" rev="0.14.0">
  <artifact name="koara-html" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.koara', module='koara-html', version='0.14.0')
)
libraryDependencies += "io.koara" % "koara-html" % "0.14.0"
[io.koara/koara-html "0.14.0"]

Dependencies

compile (1)

Group / Artifact Type Version
io.koara : koara jar 0.14.0

test (2)

Group / Artifact Type Version
junit : junit jar 4.11
org.slf4j : slf4j-nop jar 1.7.12

Project Modules

There are no modules declared in this project.

Koara

Build Status Coverage Status ![Latest Version](https://img.shields.io/maven-central/v/io.koara/koara-html.svg?label=Maven Central) License

Koara-java-html

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

Getting started

  • Download JAR file

  • Gradle

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

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

Usage

package demo;

import io.koara.Parser;
import io.koara.ast.Document;
import Html5Renderer;

public class App {

	public static void main(String[] args) {
		Parser parser = new Parser();
		Document result = parser.parse("Hello World!");
		Html5Renderer renderer = new Html5Renderer();
		result.accept(renderer);
		System.out.println(renderer.getOutput());
	}
	
}

Configuration

You can configure the Renderer:

  • parser.setHeadingIds(boolean headingIds)
    Default: false

    Specifiy if an id should be set to heading-elements.

  • parser.setHardwrap(boolean hardWrap)
    Default: false

    Specify if newlines should be hard-wrapped (return-based linebreaks) by default.

  • renderer.setPartial(boolean partial)
    Default: true

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

io.koara

Koara

A modular lightweight markup language

Versions

Version
0.14.0
0.13.0
0.12.0
0.10
0.9.3