Pseudocode block formatting
pronoiac opened this issue · 0 comments
pronoiac commented
We want to describe some pseudocode, with placeholders, like, toward the end of chapter 1.6:
previously
At times, we've had:
- italics in a
code block
, whichdoesn't work *well*
- that's a problem in many places, honestly - non-breaking spaces -
- nested block quotes and new lines
I think these are ugly and/or error-prone to use.
other symbols
We could use other symbols to delineate placeholder text here, like [square brackets]
or {curly brackets}
.
using html pre tag
A possible solution: drop back to the <pre>
html tag. Here's how that looks:
function first-name(name): if the first element of name is a title then return the first-name of the rest of the name else return the first element of the name
That was made with:
<pre>
function first-name(name):
if <i>the first element of name is a title</i>
then <i>return the</i> first-name <i>of the rest of the name</i>
else <i>return the first element of the name</i>
</pre>
Any thoughts or suggestions?