earldouglas / codedown

Extract code blocks from Markdown files
MIT License
82 stars 5 forks source link

Allow the user to subset the input by section number #3

Closed earldouglas closed 1 month ago

earldouglas commented 7 years ago

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.

earldouglas commented 10 months ago

27 implements this for a single numbered section.

earldouglas commented 10 months ago

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