hum

Markdown Guide

Markdown Guide

hum uses GitHub Flavored Markdown (GFM) with syntax highlighting and XSS-safe rendering. Here's every supported feature.

Headings

Use ## through ##### for section headings. Each heading automatically gets an anchor ID for linking.

Section heading
## Section Title
Subsection
### Subsection Title
Sub-subsection
#### Sub-subsection Title
Minor heading
##### Minor Heading

Text Formatting

Bold
**bold text**
Italic
*italic text*
Bold + Italic
***bold and italic***
Strikethrough
~~strikethrough~~
Inline code
`inline code`

Lists

Unordered list
- First item
- Second item
- Third item
Ordered list
1. First item
2. Second item
3. Third item
Nested list
- Parent item
  - Child item
  - Another child
- Back to parent
Task list (GFM)
- [x] Completed task
- [ ] Pending task
- [ ] Another task

Code Blocks

Fenced code blocks support syntax highlighting for most popular languages. Specify the language after the opening backticks.

JavaScript
```javascript
const greeting = "Hello, hum!";
console.log(greeting);
```
Python
```python
def greet(name: str) -> str:
    return f"Hello, {name}!"
```
JSON
```json
{
  "title": "My Article",
  "category": "analysis"
}
```
Plain (no highlighting)
```
Plain text code block
No syntax highlighting
```

Blockquotes

Simple quote
> This is a blockquote.
Multi-line quote
> First line of the quote.
>
> Second paragraph of the quote.
Nested quote
> Outer quote
>
> > Nested quote inside

Tables

Tables use the GFM (GitHub Flavored Markdown) pipe syntax. Column alignment is supported.

Basic table
| Column A | Column B | Column C |
|----------|----------|----------|
| Cell 1   | Cell 2   | Cell 3   |
| Cell 4   | Cell 5   | Cell 6   |
Aligned columns
| Left     | Center   | Right    |
|:---------|:--------:|---------:|
| Left     | Center   | Right    |
| aligned  | aligned  | aligned  |

Horizontal Rules

DividerCreates a horizontal line to separate sections
---

Paywall Marker

For paid articles, use the <!-- paywall --> HTML comment to mark where the free preview ends.

Paywall markerFor paid articles only
## Introduction

Free preview content goes here.

<!-- paywall -->

## Premium Content

This section is only visible after purchase.

• If the marker is present, content splits at that exact position (ratio is ignored)

• If no marker is present, falls back to preview_ratio percentage

• The marker is invisible in rendered HTML — rehype-sanitize strips HTML comments

• Place it on its own line between paragraphs for a clean break

Supported Languages

Code blocks support syntax highlighting via rehype-highlight. Specify the language after the opening ```:

javascripttypescriptpythonrustgojavaccppcsharprubyphpswiftkotlinsqlbashhtmlcssjsonyamlmarkdown

And many more — any language supported by highlight.js works.

Rendering Pipeline

Your Markdown goes through a multi-stage pipeline to produce safe, styled HTML:

1
remark-parse

Parse Markdown into AST

2
remark-gfm

Enable GFM extensions (tables, strikethrough, task lists, autolinks)

3
remark-rehype

Convert to HTML AST

4
rehype-sanitize

Remove unsafe HTML (XSS protection)

5
rehype-slug

Add anchor IDs to headings

6
rehype-highlight

Apply syntax highlighting to code blocks

7
rehype-stringify

Output final HTML

Limitations

For security and consistency, some features are intentionally restricted:

FeatureStatus
Raw HTMLStripped by sanitizer
<script> tagsRemoved (XSS protection)
<iframe> embedsRemoved (security)
<style> tagsRemoved (consistency)
FootnotesNot supported (standard GFM only)
Math / KaTeXNot supported
Custom containersNot supported
Emoji shortcodesNot supported (use actual emoji characters)

Quick Reference

## Heading 2
### Heading 3

**bold** *italic* ~~strike~~ `code`

[Link](url) ![Image](url)

- Unordered list
1. Ordered list
- [x] Task list

> Blockquote

```python
# Code with highlighting
print("hello")
```

| Col A | Col B |
|-------|-------|
| Data  | Data  |

---