I’m not sure I would call this a bug, per se. Trailing spaces are sometimes significant in Markdown, so they can’t be routinely ignored or stripped. And the syntax for fenced code blocks (although not part of the original Markdown syntax) generally specifies they must appear on a line by themselves. So, with the extra space, they are no longer on the line by themselves.