This projects goal is to implement a fast markdown parser with an extended syntax fitted for my needs.
``` USAGE: snekdown [OPTIONS]
FLAGS: -h, --help Prints help information -V, --version Prints version information
OPTIONS:
-f, --format
ARGS: Path to the input file
SUBCOMMANDS: help Prints this message or the help of the given subcommand(s) render Default. Parse and render the document watch Watch the document and its imports and render on change ```
```md Simple Syntax !(url)
Extended syntax with a description
Extended syntax with metadata to specify the size
[metadata]
Extended syntax with metadata and no description !(url)[metadata] ```
```md Simple (default) Syntax
This is a quote
Multiline
This is a Multiline Quote
Quote with metadata (e.g. Author) [author=Trivernis year=2020 display='{{author}} - {{year}}']> This is a quote with metadata ```
Imports can be used to import a different document to be attached to the main document. Imports are parsed via multithreading.
md
<[path]
Tables MUST start with a pipe character |
```md Standalone header: | header | header | header
Header with rows | header | header | header |--------|--------|------- | row | row | row ```
Placeholders can be used to insert special elements in a specific place. Placeholders are always case insensitive.
```md Insert the table of contents [[TOC]]
Insert the current date [[date]]
Insert the current time [[time]] ```
Additional metadata can be provided for some elements.
```md String value [key = value]
String value [key = "String value"]
Integer value [key = 123]
Float value [key = 1.23]
Boolean [key]
Boolean [key = false]
Placeholder [key = [[placeholder]]]
Formatting [author = "The Great snek" date = [[date]] time = [[time]] display = "author - date at time"] ```
``` Hide a section (including subsections) in the TOC
Set the size of an image !(url)[width = 42% height=auto]
Set the source of a quote [author=Me date=[[date]] display="{{author}} - {{date}}"]> It's me
Set options for placeholders [[toc]][ordered] ```
|| These two lines
|| are centered
md
*Italic*
**Bold**
~Striked~
_Underlined_
^Superscript^
`Monospace`
:Emoji:
§[#0C0]Colored text§[] §[red] red §[]
Bibliography entries can be defined and referenced anywhere in the document.
Definition:
md
Usage:
There is a book about snekdown[^book] and a github repo[^github].
Bibliography entries are only shown when used in the document.
The end goal is to have a markup language with features similar to LaTeX.