Ways to write Pseudo Code in Asciidoc
Posted by smitty4doc on Jan 28, 2021; 3:18am
URL: https://discuss.asciidoctor.org/Ways-to-write-Pseudo-Code-in-Asciidoc-tp8464.html
Anyone have any suggestions on how to write Pseudo Code in Asciidoc?
I tried something like:
IF some condition::
*Method* and it's description::::
else::
Some other *Method* and it's description::::
EndIf
but this got ugly quick when the nesting started going deep and I needed deeper indentation (only 3 or 4 levels though).
I thought about using [source,pseudo], but this doesn't exist and it only helps in preserving indentation,
but I want to be able to bold some text in the pseudo code too.
This is not formal Pseudo code, I just want a good way to communicate some Logic to Business Analyst types that are not programmers and don't want to read code.
I ended up using Mermaid and creating a flowchart, but I would have preferred something simpler and am looking for ideas for ways I might incorporate nice looking Pseudo code into AsciiDoc.
Thanks,
Smitty