owickstrom / pandoc-include-code

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

Feature Request: Make endLine optional #21

Open bloudraak opened 5 years ago

bloudraak commented 5 years ago

Consider the following bash script src/golang/hello/build.sh:

#!/bin/sh
./hello -arg1 arg1 -arg2 arg2 -arg3 arg3 -arg4 arg4 -arg5 arg5

In my markdown, I'd like to specify the something like

Which would skip the comment for bash and start including code from line 2 until the end, no matter how many lines that may be. This would greatly reduce the maintenance while the script is still being developed. So if I was to change the bash script to be as follows, I don't have to update the markdown document to specify the endLine. The output is still correct.

#!/bin/sh
./hello -arg1 arg1 \
           -arg2 arg2 \ 
           -arg3 arg3 \ 
           -arg4 arg4 \ 
           -arg5 arg5

Currently I'm required to specify endLine which means I have to remember to update the document whenever I update the file. This often introduces errors as well as taking my focus away from writing content.