> For the complete documentation index, see [llms.txt](https://vector-privacy.gitbook.io/vector-privacy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vector-privacy.gitbook.io/vector-privacy/vector-messenger/features/markdown.md).

# Markdown

Vector Messenger has integrated [GitHub Flavored Markdown (GFM)](https://marked.js.org/#specifications) style, with unique customizations and additions. Markdown is a method of stylizing text inside the messenger. Examples are making text bold, italic, underlined, adding code blocks, and so forth. Markdown is a helpful tool for reading, legibility, and communicating thoughts in a more clear method. It can help the user more quickly identify the message, including adding title headers or bullet points. As simple paragraph or body text can make reading less interesting for some, markdown styling is used as a common tool to help convey ideas in a more optimal fashion. For reference, the GitBook you are reading now uses markdown styling.

***

### Examples

#### Headers

```
# H1 Heading
## H2 Heading
### H3 Heading
#### H4 Heading
##### H5 Heading
###### H6 Heading
```

{% hint style="info" %}
Only ATX-style headings using `#` are supported.&#x20;

Setext-style headings (underlining text with `===` or `---`) are disabled.
{% endhint %}

***

#### Text Stylization

```
**Bold Text** or __Bold Text__
*Italic Text* or _Italic Text_
~~Strikethrough Text~~
<u>Underlined Text</u>
`Inline Code`
||Spoiler Text||
```

{% hint style="info" %}
Tip: Tapping or clicking inline code will automatically copy it to your clipboard.
{% endhint %}

***

#### Lists

**Unordered Lists**

```
* Item 1
* Item 2
  * Sub-item 2.1
  * Sub-item 2.2
```

**Ordered Lists**

```
1. First item
2. Second item
3. Third item
```

{% hint style="info" %}
Only `-` and `*` are supported as list markers. The `+` marker is disabled.
{% endhint %}

***

#### Blockquotes

```
> This is a blockquote.
> Each line must start with > to continue the quote.
```

{% hint style="info" %}
Every line of a blockquote must begin with `>`. Lines without it will not be included in the quote block.
{% endhint %}

***

#### Hyperlinks

```
[Link Text](https://example.com)
```

To share a link without generating a preview, wrap the URL in angle brackets:

```
[Link Text](<https://example.com>)
```

***

#### Tables

```
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Cell 1   | Cell 2   | Cell 3   |
| Cell 4   | Cell 5   | Cell 6   |
```

{% hint style="info" %}
Tables are automatically wrapped in a scrollable container on smaller screens.
{% endhint %}

***

#### Horizontal Rule

```
---
```

***

#### Code Blocks

For utilizing Code Blocks markdown formatting, start and end with 3 consecutive backticks or backquotes. On the first line after your last backtick, you can write the specified programming language and markdown will automatically detect it to make it easier to read. Every code block includes a copy button for convenience.

```rust
use vector_sdk::VectorBot;
use nostr_sdk::prelude::*;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let keys = Keys::generate();
    let bot = VectorBot::quick(keys).await;

    let chat_npub = PublicKey::from_bech32("npub1example...")?;
    let chat = bot.get_chat(chat_npub).await;

    let success = chat.send_private_message("Hello, world!").await;
    println!("Message sent: {}", success);

    Ok(())
}
```

***

#### Collapsible Sections

```
<details>
<summary>Click to expand</summary>
Hidden content goes here.
</details>
```

***

### Custom Changes

The following are Vector-specific customizations to standard GFM behavior:

* Disabled using the `+` sign to create lists. Only `-` and `*` are supported.
* Disabled markdown images. Images are handled as file attachments instead.
* Disabled autolinks (bare URLs). Vector handles URL detection and linking separately.
* Disabled setext-style headings (`===` / `---`). Only ATX `#` headings are supported.
* Integrated `highlight.js` for code block syntax highlighting.
* Added spoilers using `||spoiler text||` Discord-like syntax.
* Code blocks include an injected copy button for convenience.
* Inline code can be tapped or clicked to copy to clipboard.
* Links wrapped in angle brackets `[text](<url>)` suppress link previews.
* Tables are automatically wrapped in a scrollable container on smaller screens.
