Skip to content

m4tty/cajun

Repository files navigation

cajun

Cajun: a Creole processor in golang

Creole (which is a markdown like format, but simpler and safer) processor. Takes in creole outputs html.

![GoDoc] (https://godoc.org/github.com/m4tty/cajun?status.png) Build Status

Motivation

An excuse to write a lexer. I also like Creole over Markdown. Because reasons. This Why Markdown Is Not My Favourite Language covers it pretty well.

Installation

With Go and git installed:

go get github.com/m4tty/cajun

will download, compile, and install the package into your $GOPATH directory hierarchy. Alternatively, you can achieve the same if you import it into a project:

	import "github.com/m4tty/cajun"

and go get without parameters.

Design

It is a traditional lexer, but followed much of the strategy (a state machine that emits tokens on a channel) explained here by Rob Pike. [Lexical Scanning in Go - Rob Pike] (https://www.youtube.com/watch?v=HxaD_trXwRE)

Example

Transform some input using:

output := cajun.Transform(input)

About

Cajun: a Creole processor in golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages