-
Notifications
You must be signed in to change notification settings - Fork 7
Markdown
Xeres doesn't implement HTML for the following reasons:
- HTML is difficult to parse and render
- it is bloated
- it requires CSS to be really useful (and this adds more bloat)
- it has security issues (will that JS interpreter coming with that WebKit fork really be turned off?)
Because of that, a simple markdown renderer and editor is implemented instead and incoming HTML is converted to markdown.
Headers from 1 #
to 6 ######
are supported. A space between the last '#' and the title is required.
Example: # hello
Code is supported both between single inverted quotes and with indention (either 4 spaces or a tab character).
Bold and italic is supported, both single and double stars and single and double underlines.
Example: this is *italic*
and this is **bold**
. But this is also _italic_
and this is also __bold__
.
Both single inline URLs and markdown URLs with or without description are supported.
Example: https://xeres.io
or [Xeres](https://xeres.io)
Inline images (using data: URIs) are supported with either PNG or JPEG.
Example: ![Image](data:...)
Incoming HTML is automatically converted to markdown. The following tags are supported:
Images are converted to markdown images, but only if they contain inline data. External references are ignored.
Hyperlinks are converted to markdown links.
Paragraphs are preserved in the markdown by inserting an empty line.
Line breaks are preserved as well by adding an empty line.
Headers are converted to markdown headers.
Unnumbered lists are converted to markdown lists.