earldouglas/codedown

Allow the user to subset the input by section number

Opened this issue · 2 comments

Sometimes you just want certain section(s) of a Markdown document, rather than the whole thing. It would be handy to be able to specify them as a list of arguments:

$ cat <file.md> | codedown <lang> [<range> [<range> ...]]

Where <range> can be a single section, e.g. 1.6, or a range of sections, e.g. 1.6-2.4.

#27 implements this for a single numbered section.

#28 implements this for a single named section, inspired by metaist/litparse#1.