Skip to content

SevenMarkA DSL for SevenWiki

High-performance Rust-based markup parser

Quick Start

Try SevenMark syntax:

sevenmark
**Bold text** and *italic text* with ^^superscript^^ and ,,subscript,,.

{{{#table
    [[[[Header 1]] [[Header 2]]]]
    [[[[Cell 1]] [[Cell 2]]]]
}}}

{{{#list #1
    [[First item with **bold** text]]
    [[Second item with {{{#code console.log("hello") }}}]]
    [[Third item]]
}}}

Current time: [now] // This is a comment

Key Features

Text Styling

  • **bold**, *italic*, __underline__, ~~strikethrough~~
  • ^^superscript^^, ,,subscript,,
  • Headers: # ## ### #### ##### ######
  • Collapsible headers: ##! Header (exclamation after #)

Block Elements

  • Tables: {{{#table [[[[Cell]]]] }}}
  • Lists: {{{#list #1 [[Item]] }}}
  • Code: {{{#code #lang="rust" code }}}
  • Math: {{{#tex formula }}} or {{{#tex #block formula }}}
  • Quotes: {{{#quote content }}}
  • Folds: {{{#fold [[summary]] [[details]] }}}
  • Images: [[#file="image.png" Alt text]]
  • Links: [[#url="https://example.com" Link text]]
  • Wiki Pages: [[#document="PageName" Link text]]
  • Categories: [[#category="CategoryName" Link text]]
  • Files: [[#file="doc.pdf" #url="backup" Document]]

Wiki Features

  • Include: {{{#include PageName }}} or {{{#include #namespace="Document" PageName }}}
  • Category: {{{#category Category Name }}}
  • Redirect: {{{#redirect TargetPage }}}

Advanced Features

  • Comments: // inline and /* multiline */
  • Macros: [now], [age(1990-01-01)], [var(name)], [br], [fn], [null]
  • Variables: {{{#define #name="key" #value="val"}}} + [var(key)]
  • Variable Shadowing: Later definitions override earlier ones
  • Styling: {{{ #style="css" #color="red" content }}}
  • Parameters: #style, #color, #size, #x, #y
  • Escaping: \*literal\*, \{\{\{not-element\}\}\}