You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say in markdown if you have a code block like Lua (w/ vim) or vue (w/ CSS and JS) which can also have multiple child languages then only the commentstring from the parent lang will be used instead of using the commentstring of child language.
Suppose you have this code block inside markdown and if you try to comment echo 1234 you'll get -- instead of "
This PR fixes commenting in nested (injected) code blocks. Like in markdown you can have multiple code blocks and those code blocks can also have injected languages for example `markdown -> vue -> css/js`
### Before
```vue
<style>
body {
<!-- color: red; -->
}
</style>
<script>
while (true) {
<!-- console.log("neovim is awesome!"); -->
}
</script>
```
### After
```vue
<style>
body {
/* color: red; */
}
</style>
<script>
while (true) {
// console.log("neovim is awesome!");
}
</script>
```
---
Closes#137
Let's say in
markdown
if you have a code block like Lua (w/ vim) or vue (w/ CSS and JS) which can also have multiple child languages then only the commentstring from the parent lang will be used instead of using the commentstring of child language.Suppose you have this code block inside markdown and if you try to comment
echo 1234
you'll get--
instead of"
And same with vue, commenting
color: red;
uses<!-- -->
instead of/* */
The text was updated successfully, but these errors were encountered: