WordPress automatically do formatting of codes which can surely become a huge problem for many blogger. But this can be disabled easily. Just follow this one step tutorial and you should be good.
Note: Do take backup of your theme before you try this.
01. Just Add below code in your functions.php file:
This concludes this simple and useful tutorial. Hope you like it.