Add include-as-code-block logic
#7
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.