pyrmont / lemongrass

A converter in Janet for markup languages like HTML and XML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lemongrass

Build Status

Lemongrass is a pure Janet library for converting between markup languages like HTML and XML and Janet data structures.

Installation

Add the dependency to your project.janet file:

(declare-project
  :dependencies ["https://github.com/pyrmont/lemongrass"])

Usage

Lemongrass can be used like this:

(import lemongrass)

(lemongrass/markup->janet `<h1 class="foo">Hello world!</h1>`)
# => @[:h1 @{:class "foo"} "Hello world!"]

(lemongrass/janet->markup [:h1 {:class "foo"} "Hello world!"])
# => "<h1 class="foo">Hello world!</h1>"

Bugs

Found a bug? I'd love to know about it. The best way is to report your bug in the Issues section on GitHub.

Licence

Lemongrass is licensed under the MIT Licence. See LICENSE for more details.

About

A converter in Janet for markup languages like HTML and XML

License:MIT License


Languages

Language:Janet 100.0%