valentinnodan / mdx-intellij-plugin

MIT License
8 stars 2 forks source link

Generic type params inside code blocks are interpreted as tags #8

Open var-ram opened 3 years ago

var-ram commented 3 years ago

Very happy to find the plugin.

Just noticed some issues with having code block in the content. The IDE complains when you have type params inside a block. This is what I see for the following mdx:

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

<Tabs
    groupId="code-example"
    defaultValue="kotlin"
    values={[
        {label: "Kotlin", value: "kotlin",},
    ]
    }>
    <TabItem value="kotlin">
        ```kotlin
        val foo: Foo = "foo"
        val bar: Bar<Baz> = Something()
        bar.forEach {
            println("""Lorem ipsum ${it.something().map { it -> "${it}" }}""")
        }
</TabItem>


![image](https://user-images.githubusercontent.com/2122339/95421726-b95d4880-0989-11eb-8d1a-8f3a0fcbb15c.png)

Also triple quoted strings show up with the following error:
![image](https://user-images.githubusercontent.com/2122339/95421717-b5312b00-0989-11eb-90dd-d8efdbda010f.png)
anstarovoyt commented 3 years ago

rel https://youtrack.jetbrains.com/issue/WEB-47755