mystmd
mystmd copied to clipboard
literal include directive for function
Is there a way to use the literalinclude directive for a particular function?
I am using for a function named automate_training the following code:
:::{literalinclude} assets/utils.py
:start-at: automate_training
:end-at: print(
:::
My function does not have a return statement and therefore I am trying to 'hack' the literalinclude by using the print( word.
But this is overall a very hacky method and if I add in a line later at the end it would break.