This is not red because it appears before any paragraph.

Here is a paragraph.

Here is some code. This span is red because it appears after the paragraph, even though there are other nodes in between

Whatever it may be, keep smiling.

Dream big

Doesn't matter how many or what kind of nodes are in between, all spans from the same parent after a paragraph are red.
This span is not red because it doesn't share a parent with a paragraph