Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pseudocode block formatting #168

Open
pronoiac opened this issue Jun 10, 2022 · 0 comments
Open

Pseudocode block formatting #168

pronoiac opened this issue Jun 10, 2022 · 0 comments

Comments

@pronoiac
Copy link
Collaborator

pronoiac commented Jun 10, 2022

We want to describe some pseudocode, with placeholders, like, toward the end of chapter 1.6:

function first-name

previously

At times, we've had:

  • italics in a code block, which doesn'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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant