Closed kinow closed 2 years ago
For my version of sphinx it errors on this, not a message. So, it is impossible to build in the current condition. I get -- /home/swz/user_guide/src/topics/inputs.md.rst:222:line number spec is out of range(1-1): '3, 9-10, 24' make: *** [Makefile:50: html] Error 2
Huh I will try updating my dependencies too and test it. Thanks for reportingit @swzCuroverse !
We use
emphasize-lines
to highlight certain lines of our code blocks. This way we can highlight the first line (emphasize-lines: 0
), multiple discrete lines (emphasize-lines: 0, 3, 10
), or ranges (emphasize-lines: 0, 3-10, 12, 20-21
).That works with
code-block
, but apparently it's not working withruncmd
: https://github.com/common-workflow-language/user_guide/pull/246#discussion_r991056786 (cc @mr-c).Note that we have copied the code from the original runcmd since we needed a few modifications to support running our CWL examples in an isolated Docker environment consistently.
In both the original, and in our version of
runcmd
, theruncmd
directive extendsCodeBlock
. This means that the final rendered output **is acode-block
, and it supportsemphasize-lines
.However, you should see some warnings saying that it couldn't locate lines above number
0
, I think. That's because I believeruncmd
is trying to highlight lines for an output line{runcmd} cwltool test.cwl
, instead of using the rendered output (i.e.{code-block} cwltool version etc.\ncommand-output lines, etc….
.If this is confirmed, it shouldn't be too hard to change the order somehow to make
runcmd
to evaluate the command first, and only then use theemphasize-lines
option. Unless the only way of doing it requires changes to thecode-block
directive Python object itself (hopefully not).Cheers -Bruno