Table of Contents

  1. Post-processing

Across the site, sr.ht uses mistletoe for rendering Markdown. It implements CommonMark, which is much more well-defined than the original Markdown specification.

Additionally, some extensions to CommonMark are used.

  • Plain link URLs (of the form <scheme>://<path>) and plain e-mail addresses (of the form <name>@<domain>) can be used, and they will be turned into the appropriate links (for e-mail addresses, this prepends mailto:).
Post-processing

Rendered HTML is post-processed so that it only consists the following tags and attributes (in the format tags...: attributes...)

  • a: href, title
  • abbr: title
  • acronym: title
  • b
  • blockquote
  • code
  • dd
  • div
  • dl
  • dt
  • em
  • h1, h2, h3, h4, h5, h6: id
  • i
  • img: alt, height, width, src (only HTTP/HTTPS/local URLs)
  • input: type=checkbox, checked, disabled
  • li
  • ol
  • p
  • pre
  • q
  • span
  • strong
  • table
  • tbody
  • td
  • th
  • thead
  • tr
  • ul

All tags can have the attributes class, style, colspan and rowspan. The only allowed classes are row, col-md-*, and form-control.

Here are valid style attributes:

  • margin
  • padding
  • text-align
  • font-weight
  • text-decoration
  • padding-{left,right,bottom,top}
  • margin-{left,right,bottom,top}

About this wiki

commit 64dd454d025e91c76405cd1d04f51ea8e7a4f6a7
Author: wheezard <90904039+wheezard@users.noreply.github.com>
Date:   2024-09-07T05:46:36+04:00

man: fixed a typo (missing closing parenthesis)
Clone this wiki
https://git.sr.ht/~sircmpwn/sr.ht-docs (read-only)
git@git.sr.ht:~sircmpwn/sr.ht-docs (read/write)