# Automatically include newline if post ends in triple grave

The question says it all. I'm unsure if this is a bug or not, just something I've noticed over the years on this website.

Currently, if a user posts a question with code at the end of the question, the mark  is visible in the code body. A simple solution would be to check if those are the last three characters of a question body, because we can't expect new users to know that a newline after the triple graves would change their visibility.

I propose this change because, in my opinion, it makes the question look more professional. It also helps people that just copy paste code from the question if you decide to post a review. Below is an example of what it looks like currently:


def main():
print("This section is fine, because  are not the final three characters")



However:


def main():
print("Look below me! You can still see the !")

$$$$

• Yes, this is a well-known problem with code fences. It seems to affect us more than other sites, for some reason - I don't know if it's because our posts are more likely to end in a code block, or whether it's something to do with the larger size limit compared to other SE sites. It shouldn't need the post to be modified - the parser needs to treat post-end the same as line-end. Apr 22 at 9:54
• Isn't there a Meta Stack Overflow or Meta Stack Exchange post about this (not a rhetorical question)? Apr 22 at 10:39
• Apr 22 at 18:04