Thanks to some experiments with @ambihelical, we've characterized the particular way #Qoto's Markdown support is broken with respect to code blocks.
Its Markdown mode is exactly backwards with respect to newlines: are ignored inside code blocks, but inside normal paragraphs newlines are treated as `<br>`. But another bug in Markdown support partly cancels this out if the code block is at the beginning of the post, because then, treats the code block as a normal paragraph.
This suggests a straightforward, if inconvenient, workaround: instead of using a code block, use a normal paragraph, but wrap each line within the paragraph in `` ` ``. Unfortunately, due to a third bug in Markdown support, this doesn't actually work; the first line is fine, but the typewriter text on subsequent lines incorrectly fails to be recognized:
`def main():`
` print('hello')`
` print('world')`
A fourth bug means that newlines after the first one are ignored, perhaps because are incorrectly parsed as being part of another code block; I think in a case like this you don't have that problem:
def main():
print('hello')
print('world')
@rmerriam @ambihelical I don't know, I'm going to wait until tomorrow before I ask him again.