vsch / idea-multimarkdown

Markdown language support for IntelliJ IDEA.
https://plugins.jetbrains.com/plugin/7896-markdown-navigator
Apache License 2.0
816 stars 129 forks source link

Surrounding markdown code blocks with alternate code blocks breaks #833

Open allejo opened 4 years ago

allejo commented 4 years ago

It is valid to nest to code blocks in markdown as such:

~~~markdown
```php
<?php

echo someFunction();
```
~~~

You can see how GitHub handles this below:

```php
<?php

echo someFunction();
```

However, this breaks all parsing after these nested code blocks in this plugin.

image image

vsch commented 4 years ago

@allejo, it is an issue with CommonMark parser which need to be upgraded to version 28.1 compatibility.

Previous version treated ~~~ and ``` and interchangeable so the triple tilde is closed by the triple back ticks.

The only workaround for now is to use 4 or more tilde or back ticks on the outer code fence:

~~~~markdown
```php
<?php

echo someFunction();

`````