kevin940726 / remark-code-import

📝 Populate code blocks from files
https://npm.im/remark-code-import
MIT License
63 stars 11 forks source link

Add option to remove added node meta #21

Open dominiwe opened 2 years ago

dominiwe commented 2 years ago

When we have for example a code block starting like this:

```plain file=somefile

I think it would be extremely convenient to have an option to remove the file=somefile part, after the contents of the file were loaded.

So that afterwards this would be left:

```plain
content of somefile

This could make the plugin more compatible with code syntax highlighters and other plugins.

Right now, the workaround for me was to manually clean this up with the plugins remark-code-extra and remark-code-frontmatter which let me basically move that to a frontmatter block within the code block, but an option here would be much cleaner.

kevin940726 commented 2 years ago

Sounds like a good candidate for an optional option in the plugin! Sorry I was AFK last month and a bit busy recently. PR welcome if you wanna help! ❤️

dominiwe commented 2 years ago

Hey, no worries :) Thank you for making this great plug-in! My semester just started but if I can find time I'll look at it and create a PR.