Version: v0.6.1 - Beta.  We welcome contributors & feedback.  THanks!


Litemark is a lightweight markup language based on Markdown. It's useful for writing content, documentation, blog articles, forum posts, etc.

Compared to Markdown, it has a somewhat simpler syntax and is extensible via Square Tags ([...]).

You can use Litemark in 3 ways:

Inline Markup

This is __italics__
This is **bold**
This is **bold with __italic text__ inside**
This is a `code tag`
This is a long dash -- and "smart quotes".
This is italics This is bold This is bold with italic text inside This is a code tag This is a long dash — and “smart quotes”.


One or more blank lines separates text into paragraph blocks.

Here is a paragraph.

Here is another.
It has two sentences that go together.

Here is a paragraph.

Here is another. It has two sentences that go together.


Links use a square tag with the URL as the first argument. The 2nd label argument is optional.

We use [ | DuckDuckGo] for search.
We use DuckDuckGo for search.
TODO Auto-linked URLs.


Images use the image square tag.

A work of art:

[image /images/artwork.jpg]

A work of art:


- Item 1
- Item 2
- Item 3

+ Item 1
+ Item 2
+ Item 3
  1. Item 1
  2. Item 2
  3. Item 3
TODO Nested lists.


# Heading 1
## Heading 2
### Heading 3
Heading 1
Heading 2
Heading 3

Block Quotes

Note: Line breaks are preserved.

> This is a famous quote.
> -- Someone Famous
This is a famous quote.

— Someone Famous

Code Blocks

Start and end a line with three backticks.

    $a = 123;
    if $a > 200 {
$a = 123;
if $a > 200 {
TODO Custom language classes.


HTML support is only intended for content authors, not for visitors posting comments, etc.

There are two places where HTML tags are passed through as-is:

  1. Inside of a Litemark template function.
  2. When calling Litemark.parse with the HTML argument set to true.


<div style="text-align: center">
    **This is an <span style="color:orange">HTML styled</span> message.**

This is an HTML styled message.

Caution In template functions, the Litemark parser processes the body after the placeholders are substituted in. This means you need to wrap the HTML placeholder in an extra set of HTML tags.
<div>{{ otherHtmlContent() }}</div>
TODO Litemark doesn't yet support THTML shortcut tags.

Square Tags

Square tags [ ... ] are similar to BBCode tags. They provide extra formatting via a uniform syntax and are extensible.

- [dfn DNA] is the code of life.
- Press [kbd Ctrl-C] to copy the code.
- Mutations are [del mistakes] happy accidents.
- Never put Uranium[sup 238] in your H[sub 2]O.
- Add a line break.[br]That is, if you need one.
- Add an extra space: [sp]For clarity.
- This isn't split by a line break: [nobr 1 2 3]


[info | Just a regular callout.]
[info Tip | Don't forget to tip your server.]
[success Great | You pressed the button!]
[warning Warning | Don't do the wrong thing.]
Just a regular callout.
TipDon’t forget to tip your server.
GreatYou pressed the button!
WarningDon’t do the wrong thing.

Table of Contents

The square tag [toc] will insert an auto-generated table of contents, linking to your h2 headings.

Custom Square Tags (TODO)

Custom tags start with the command name, then optional arguments, and end with the text.

[command text]
[command argument1 | text]
[command argument2 | argument1 | text]

Aside: Why doesn't THT use Markdown?

Markdown was optimized to be readable in raw form, so it has a looser syntax and a lot of edge cases to support.

Because Litemark is simpler, it can be implemented in less code (Litemark is about 10x smaller than Parsedown - 5k vs 50k), and there is less syntax for users to remember.

Also, Markdown is only "extensible" via raw HTML, which is not as useful for sites where visitors are allowed to post content.

See Also