# Fix \`\-\-\-\` in Markdown docs not rendered correctly \(\#10606\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/c834ea75efdf3f9f6ffa6271d44c1d306a284a27)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: c834ea75efdf3f9f6ffa6271d44c1d306a284a27

Requested commit: c834ea75efdf3f9f6ffa6271d44c1d306a284a27

Commit: c834ea75efdf3f9f6ffa6271d44c1d306a284a27

Tree: be6740df9007c1fdcf060bd89ed4ffc307be2f1a

Author: Thorsten Ball

Committer: GitHub

## Message

````
Fix `---` in Markdown docs not rendered correctly (#10606)

This fixes #10511 by turning off the YAML metadata block rendering in
the Markdown parser.

`clangd` uses `---` as dividers, but our parser interpreted it as a YAML
metadata block, even though it didn't contain any valid YAML.

Example Markdown from `clangd`:

    ### instance-method `format`

    ---
    → `void`
    Parameters:
    - `const int &`
    - `const std::tm &`
    - `int & dest`

    ---
    ```cpp
    // In my_formatter_flag
    public: void format(const int &, const std::tm &, int &dest)
    ```

What's between the two `---` is *not* valid YAML. Neovim, too,
interprets these as dividers and renders them as such.

And since we don't handle any possible metadata anyway, we can turn off
the metadata handling, which causes the parser to interpret the `---` as
dividers.



Release Notes:

- Fixed Markdown returned by `clangd` being rendered the wrong way.
([#10511](https://github.com/zed-industries/zed/issues/10511)).

Before:

![screenshot-2024-04-16-12 32
15@2x](https://github.com/zed-industries/zed/assets/1185253/a268f106-9504-48aa-9744-42a7521de807)

After:

![screenshot-2024-04-16-12 33
02@2x](https://github.com/zed-industries/zed/assets/1185253/dd178a63-a075-48a9-85d9-565157a5b050)

Co-authored-by: Bennet <bennetbo@gmx.de>
````

## Parents

- [4d8cba2addd07429d7d86dccc220c5f99982f112](https://git.cafe/gitcafe/zed/commit/4d8cba2addd07429d7d86dccc220c5f99982f112?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/c834ea75efdf3f9f6ffa6271d44c1d306a284a27?format=markdown)
