owickstrom / pandoc-include-code

A Pandoc filter for including code from source files
Mozilla Public License 2.0
141 stars 17 forks source link

Feature Request: File/Text inclusion #8

Closed RonaldFindling closed 6 years ago

RonaldFindling commented 6 years ago

It would be great if this tool could also include "text" not only code.

For example markdown misses a way to include text. I'm aware that this might not be 100% the intended useCase, nevertheless I'd think it would fit the tool pretty nicely. Syntax could be something like <<[input_file.md] which then gets directly replaced with the files content.

Thanks for this useful tool

owickstrom commented 6 years ago

Hi! Yeah, I think it's out of scope for this filter. If you want you can fork this codebase and adapt it to do something like what you said. Also, I suppose a more "pandocy" way of accomplishing your goal is to invoke pandoc on many smaller files and combine those results with some other tool (e.g. just cat them together.)

RonaldFindling commented 6 years ago

Hi @owickstrom , I thought about the split up and combine idea but it doesn't fit my usecase too well. In the end I just wrote myself a groovy script that I use as a pre-processor. Thx for your reply :)

owickstrom commented 6 years ago

@RonaldFindling All right, glad it worked out!