Nyctergatis Markup Engine (
NME) - Simple text markup formatting based on Creole.
- Author:
- Yves Piguet
- See also:
- http://www.nyctergatis.com (home of NME project) and http://www.wikicreole.org (Creole site).
The following markup is recognized:
- =main title=
- ==section title==
- ===subsection title=== etc.
- empty-line-separated paragraphs
- * (asterisk) for lists (multiple lines allowed, merged)
- # for numbered lists (multiple lines allowed, merged)
- ; : for definition lists (sublists are obtained by repeating *#;)
- : for indented paragraphs
- lines between {{{ and }}} alone in lines: preformatted (tabs are replaced with spaces with 4-char alignment)
- **bold**
- //italic//
- __underline__
- ## monospace ##
- ^^superscript^^
- ,,subscript,,
- {{{verbatim}}}
- ~x (escaped character, where x is nonblank)
- ---- alone in a line for a horizontal rule
- [[link]] or [[link|text]]
- {{image}} or {{image|alt text}}
- <<plugins>>, or block plugins where << and >> are alone in lines
- <<<placeholder>>>
- NME.c, NME.h: main source code of NME; everything else is optional
- NMEAutolink.c, NMEAutolink.h: optional support for automatic conversion of CamelCase words (aka wiki words, i.e. words with mixed lowercase and uppercase letters used in some wikis as page names) and/or URL to links without requiring the double-bracket markup
- NMEMain.c: source code of a command-line application which filters input text with NME markup, with support for many options
To convert text with
NME markup to another format, such as HTML or RTF, only
NME.c and
NME.h are required. The code below shows how to convert markup to HTML.
Inline images are subject to cross site scripting if links to arbitrary sources are supported. Hypertext links are less dangerous, because they must be clicked by the user and they are loaded in separate pages.