Sometimes, when you add shortcode in post, you will find some incorrect spaces. This is because of wrong WordPress auto formatting. For fixing this problem, just add to function.php
code:
remove_filter( 'the_content', 'wpautop' ); add_filter( 'the_content', 'wpautop' , 99); add_filter( 'the_content', 'shortcode_unautop', 100 );