Excerpt vs content formatting woes

the_content() and the_excerpt(), unlike their ‘get_’ brothers will process the content through some functions, one of them is wpautop() that will add p tags for you. To get the same formatting for both excerpt and content:

if ( has_excerpt() ) {
  the_excerpt();
} else {
  the_content(__('Read more'));
}

tech