OSDN Git Service

add extra newline if longdesc exists
authorscribu <mail@scribu.net>
Sun, 4 Aug 2013 13:39:07 +0000 (16:39 +0300)
committerscribu <mail@scribu.net>
Sun, 4 Aug 2013 17:58:19 +0000 (20:58 +0300)
php/commands/help.php

index e4686e1..25048e6 100644 (file)
@@ -37,7 +37,10 @@ class Help_Command extends WP_CLI_Command {
        private static function show_help( $command ) {
                $out = self::get_initial_markdown( $command );
 
-               $out .= $command->get_longdesc();
+               $longdesc = $command->get_longdesc();
+               if ( $longdesc ) {
+                       $out .= $longdesc . "\n";
+               }
 
                // section headers
                $out = preg_replace( '/^## ([A-Z ]+)/m', '%9\1%n', $out );