Literate.jl
Literate.jl copied to clipboard
Filtering blocks of code
I have some large test suites for some libraries – DynamicExpressions.jl and SymbolicRegression.jl – that I want to start rewriting in Literate.jl format to serve as an extended documentation. I like how Interfaces.jl does this in this file and wanted to try it with my own test suites.
However, these test suites are very large, and include a lot of not-useful cases that the user wouldn't need to see. Basically there is only 5% of these scripts that I would want Literate to render. So I was wondering what the best way is to filter all code except a specific block? As far as I can tell, the #src command can filter individual lines. So, I am wondering if there is something like #literate_begin and #literate_end that cause the parser to filter out that specific block of code?
I'm happy to just write a preprocessing step in my docs generation but basically I wanted to see if I was missing a common workflow that people use already.