A simple text-only markup language & mint-to-html compiler.
Find a file
2026-01-05 19:03:25 +01:00
.gitignore Add initial project files (example mint file, converter, .gitignore) 2026-01-05 13:33:56 +01:00
example.mint Add README with markup reference and improve example.mint 2026-01-05 18:55:18 +01:00
mint2html.py Add initial project files (example mint file, converter, .gitignore) 2026-01-05 13:33:56 +01:00
README.md Add documentation for the mint2html.py to the README 2026-01-05 19:03:25 +01:00

mint - Minimal Text Markup

Mint is a minimal text markup language that can be compiled to html.

As of version 0.1, mint supports

- comments
- headings
- subheadings
- italic text
- bold text
- underline text
- keep whitespaces (html `<pre>`)
- manual line breaks (html `br`)

Syntax

Note

See example.mint for a working usage example.

Like HTML, Mint uses tags to style documents. A tag consists of a forward slash /, one letter (e.g. b) and another forward slash. Tags toggle a style, so you can start bold text with /b/ and end it with /b/.

Comments

/#/This is a comment/#/

Warning

Comments aren't compiled into html comments, but skipped!

Headings and Sub-headings

/h/Heading/h/

/s/Subheading/s/

Headings are compiled into <h1>, subheadings into <h2>.

Bold, italic and underlined text

Text can be /b/bold/b/, /i/italic/i/ and /u/underlined/u/, or /b//i//u/everything at once/b//i//u/.

Keep whitespaces

Whitespaces (spaces, newlines, etc.) won't get rendered in HTML.
To preserve whitespaces, use

/e/
This text
           will be indented.
/e/

Newlines

You can insert newlines with

/l/

Note

This tag cannot be closed.

Escape slashes

If you want to write a /, use a

//

Converter

To convert mint to html, use mint2html.py.

Example:

./mint2html.py -i input_file.mint -o output_file.html

You can also omit the input/output files to read from stdin/output to stdout.

Use mint2html.py --help to view the full help text.