Code following a list, though not to be included in the list itself, is not correctly rendered, as shown below.
I have tried inserting linebreaks, to no avail. Inserting "dummy" text will help the renderer. Have I misunderstood the formatting?
The downvote as a duplicate is fair, as the original question is definitely the same. I should have searched meta for this problem.
However-- many (appreciated) answers have explained various workarounds or manual spacing adjustments. These suggestions overlook a problem I mentioned (in the comment in the sample code snippet): the {}
(code) widget does not format the code (either as a list item or following the list) in this context. This is, IMO, a UI/UX bug (confusion which lead to this post, obviously). By comparison, if the B
(bold) toolbar widget failed to bold the text in certain contexts, I think it would be recognized as a bug without much contention.
Here is a list.
One
Two
Three
module Foo
Not formatted as code, despite four space indentation and trying the
{}
widget.end
Here is another list.
- One
- Two
Inserting this text fixes the renderer.
module Foo
# Now formatted as code.
end
{}
toolbar widget should correctly format the code (however it wants to accomplish that, insert ```, or otherwise).<br>
fix the problem for you? That's HTML for a line break.<p>
, suggested elsewhere. Although either must be preceded and followed by an empty line. Lots of explanation provided in other answers and the FAQ, all of which I missed. :){}
widget button would simply do what it purports to do, however.{}
button is really just an "indent everything in the selection by four spaces" button, which is sometimes but not always the "code block" button.