Source in sample code into Markdown docs automatically
mbrukman opened this issue · comments
Right now, README.md
includes copy-pasted code from sample code in src/example/
tree, but they're not kept in-sync automatically.
Ideally, we would have a process for automatically including code samples, e.g., via some preprocessing since it's probably not possible to do it dynamically, so that we can avoid having to see them diverge, e.g., as can be seen in issue #28 and possibly others.
It will also ensure that the code remains valid, as it will be compiled when it's in the src/example
directory, but we cannot compile or test code while it's in the README.md
file.