Skip to content

Support comments in nested (injected) code blocks  #137

Closed
@numToStr

Description

@numToStr

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 "

\```lua
use {
    'numToStr/Comment.nvim',
    config = function()
        require('Comment').setup()
        vim.cmd[[
            -- echo 1243
            norm! ggG
        ]]
    end
}
\```

And same with vue, commenting color: red; uses <!-- --> instead of /* */

\```vue
<style>
body {
  <!-- color: red; -->
}
</style>
\```

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions