Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Markdown parser in Clojure
branch: master

This branch is 225 commits behind yogthos:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
js
src-cljs
src
test
README.md
example.html
project.clj

README.md

Markdown parser written in Clojure

A markdown parser which compiles to both Clojure and ClojureScript.

Installation

Leiningen

[markdown-clj "0.9.8"]

Maven

<dependency>
  <groupId>markdown-clj</groupId>
  <artifactId>markdown-clj</artifactId>
  <version>0.9.8</version>
</dependency>

Building

To build the Clojure jar

lein install

To compile the ClojureScript portion

lein cljsbuild once

Supported syntax

Basic Elements

Blockquote, Bold, Emphasis, Heading, Italics, Line, Paragraph, Strikethrough

Links

Image, Link

Lists

Ordered List, Unordered List

Code

Code Block, Indented Code, Inline Code


Heading

the number of hashes indicates the level of the heading

#Heading

##Sub-heading 

###Sub-sub-heading 

Line

***

* * *

*****

- - -

Emphasis

*foo*

Italics

_foo_

Bold

**foo**
__foo__

Blockquote

>This is a blockquote
with some content

>this is another blockquote

Paragraph

This is a paragraph, it's
split into separate lines.

This is another paragraph.

Unordered List

indenting an item makes it into a sublist of the item above it, ordered and unordered lists can be nested within one another

* Foo
* Bar
 * Baz
* foo
* bar

   * baz
     1. foo
     2. bar

   * fuzz

      * blah
      * blue
* brass

Ordered List

1. Foo
2. Bar
3. Baz

Inline Code

Here's some code `x + y = z` that's inlined.

Code block

Using three backquotes indicates a start of a code block, the next three backquotes ends the code block section. Optionally, the language name can be put after the backquotes to produce a tag compatible with the Syntax Highlighter, eg:

```clojure

(defn foo [bar] "baz")

```

Indented Code

indenting by at least 4 spaces creates a code block

some
code 
here

note: XML is escaped in code sections

Strikethrough

~~foo~~

Superscript

a^2 + b^2 = c^2

Link

[github](http://github.com)

Image

![Alt text](http://server/path/to/img.jpg)
![Alt text](/path/to/img.jpg "Optional Title")

License

Copyright (C) 2012 Yogthos

Distributed under the Eclipse Public License, the same as Clojure.

Something went wrong with that request. Please try again.