Markdown on sourcehut

Across the site, sr.ht uses a consistent Markdown syntax based on Python's Markdown package, which implements John Gruber's original Markdown specification.

We then post-process the HTML to strip out unwanted tags and attributes.

Tags

  • a
  • abbr
  • acronym
  • b
  • blockquote
  • code
  • div
  • dd
  • dl
  • dt
  • em
  • h1, h2, h3, h4, h5
  • i
  • img
  • input
  • li
  • ol
  • p
  • pre
  • span
  • strong
  • table
  • tbody
  • thead
  • td
  • th
  • tr
  • ul

Attributes

We allow the id attribute on h* tags and the class attribute on all tags - the only permitted values of class are:

  • row
  • col-md-*
  • form-control

You may also specify the style tag, for which you may specify the following attributes:

  • margin
  • padding
  • text-align
  • font-weight
  • text-decoration

input elements may specify type='checkbox' as well as the checked attribute.

a tags may specify href and title.

abbr and acronym tags may specify title.

Table of Contents

This commit

commit b6222a32dfc9e427f92a81bfdae8b3e0fc5ab156
Author: Drew DeVault <sir@cmpwn.com>
Date:   2019-05-16T14:38:47

Fix old references to git-srht-* binaries
Clone this wiki
man@man.sr.ht:root
https://man.sr.ht/root