1 of 3

Retina, 51 bytes

Happy birthday from a fellow string-processing language!

Byte count assumes ISO 8859-1 encoding.

$
$.`$* 
+`(.*\S.*).$
$&¶ $1
%(`$
¶$`
O$^r`.\G

¶.

Try it online!