Files
oak-gpui/crates
Thorsten BallandBennet c834ea75ef 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>
2024-04-16 12:40:13 +02:00
..
2024-04-11 15:36:35 -06:00
2024-04-12 11:40:59 -06:00
2024-04-11 15:36:35 -06:00
2024-04-15 14:00:56 -06:00
2024-04-15 14:21:52 +02:00
2024-04-12 14:39:27 -04:00
2024-03-28 18:32:11 +01:00
2024-04-11 15:36:35 -06:00
2024-04-11 23:09:12 +02:00
2024-03-20 15:52:02 +01:00
2024-04-11 15:36:35 -06:00
2024-04-11 23:09:12 +02:00
2024-03-11 10:45:57 +01:00
2024-04-11 23:09:12 +02:00
2024-04-06 19:48:11 -07:00
2024-04-11 23:09:12 +02:00
2024-03-26 16:10:09 -07:00
2024-04-12 11:40:59 -06:00
2024-04-12 11:40:59 -06:00
2024-04-12 11:40:59 -06:00
2024-03-14 17:05:07 -04:00
2024-04-11 23:09:12 +02:00
2024-04-15 14:21:52 +02:00
2024-04-15 14:21:52 +02:00
2024-04-11 10:03:36 -04:00
2024-04-12 11:40:59 -06:00
2024-04-15 14:26:05 -06:00
2024-04-11 23:09:12 +02:00
2024-04-11 15:36:35 -06:00