# 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.&#x20;

## Examples

### Headers

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

### Text Stylization

```
**Bold Text** or __Bold Text__
*Italic Text* or _Italic Text_
~~Strikethrough Text~~
`Inline Code`
```

### Lists

{% code title="Unordered Lists" %}

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

{% endcode %}

{% code title="Ordered Lists" %}

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

{% endcode %}

### 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 the programming language to make it easier to read.

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

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    // Generate new random keys
    let keys = Keys::generate();

    // Create a new VectorBot with default metadata
    let bot = VectorBot::quick(keys).await;

    // Get a chat channel for a specific public key
    let chat_npub = PublicKey::from_bech32("npub1example...")?;
    let chat = bot.get_chat(chat_npub).await;

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

    Ok(())
}```
````

<figure><img src="/files/KuORkMqFA3NHjWLQe2ZE" alt="Vector Messenger Code Block Markdown (Screenshot)" width="286"><figcaption><p>In-App Display of Code Block Markdown</p></figcaption></figure>

### Custom Changes

Custom changes so far (and more need to be done / added to this list):

* Disabled using `+` sign to create lists.
* Disabled markdown images.
* Integrated `highlight.js` for codeblock highlighting.
* Added spoilers using `||` Discord-like syntax.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vector-privacy.gitbook.io/vector-privacy/vector-messenger/features/markdown.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
