preservim / vim-markdown

Markdown Vim Mode
4.68k stars 521 forks source link

Code fence handling breaks if `~~~` appears in the fence #636

Closed KSR-Yasuda closed 1 week ago

KSR-Yasuda commented 1 year ago

Text like below will break code fence.

# Heading 1

## Heading 1-1

```text
~~~hoge~~~
```

# Heading 2

## Heading 2-1

```
~~~piyo~~~
```

# Heading 3

## Heading 3-1

```text
hogefugapiyo


# Heading 4

## Heading 4-1
~~~

Fixed the check pattern, and fence ending check to compare with the fence beginning string.

`:Toc` command and text folding do work.

Can anyone fix syntax `syntax/markdown.vim`?
KSR-Yasuda commented 1 week ago

Thank you for merging!