aboutsummaryrefslogblamecommitdiffstats
path: root/markdown/index.md
blob: 4837b34120d14be6fdfe583ffbe83214b592bcfd (plain) (tree)
1
2
3
4
5
6
7
8



                            


                                                                                
                                                              




                                                                        



























                              




















                                                                                



                                              
---
title: Markdown on sourcehut
---

Across the site, sr.ht uses a consistent Markdown syntax based on Python's
[Markdown](https://pypi.python.org/pypi/Markdown) package, which implements John
Gruber's [original Markdown
specification](https://daringfireball.net/projects/markdown/).

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`.