Add include-as-code-block logic#7
Conversation
|
There is the include-code-files filter, which still resides in the semi-retired lua-filters repository. There were discussions before about merging that filter into this one, but, as I remember, the consensus was that they are different enough to justify two separate filters. We've been trying to move the most useful filters into separate repositories, but only if there's somebody willing to maintain it. I believe this wasn't done yet in this case. If we move this filter into this org, could I convince you to co-maintain it? |
|
I have cherry-picked the fix that makes more functions local, thanks for that. However, I reverted the change to |
You mean have a separate repository only for the
I am confused about this. 🤔 The test passed and I don't see any issues? And isn't my version just syntax sugar for your version? Do have a reference or example where it fails? |
|
You're completely right about the I'm very open towards new test-infrastructure as long as it doesn't pose a security risk and doesn't complicate maintenance if you choose to leave the project. I'll try to move the filter sometime later this week. We're all doing this in our free time, so don't feel bad if you choose to opt out at some point. |
Hey,
first, thanks for creating and maintaining this filter!
For a personal project, I sometimes also need to include the contents of source code files into the final document as a "raw" code-block.
(For example, this project's
README.mdcould include the source code of thesample.mdfile.)As this filter already handles includes I thought it might be nice to add the
include-as-code-blockfeature to this filter as well, avoiding having to include two files for "fairly" similar features. (Although internallyinclude-as-code-blockis quite a bit simpler.)I understand that this might not be the exact goal of this filter, so feel free to close this PR if you feel like it does not belong to it.
PS: Happy to update the documentation and maybe clean up the code a bit if you would consider it relevant for the upstream repository.