- It can now preserve correct line numbers for debugging, which is the killer feature I’ve been trying to figure out; this is the only reason I haven’t written all my source code in this format for the past couple years.
- You can pipe the processed content over stdin/stdout instead of just writing files to disk, which should enable any shenanigans you want to wire up that I have not anticipated.
- Best of all, thanks to some logging tricks it also lets you actually execute Markdown documents. Usage would be something like this:
# use Python to execute the fenced code blocks inside script.py.md $ python $(./lit.sh --input "script.py.md" --before "#")
In addition, I’ve reimplemented the same core logic as a Rollup plugin. This is optimized for JavaScript, supports sourcemaps for debugging, and can be delivered via npm with semantic versioning for dependency management.