PowerShell Discard Empty Lines

Lately I have found myself needing to normalize the whitespace in a line-delimited list of strings and have found the following construct very useful for this need:

PS C:\Users\Dude\Code\MyRepo> git log -n 19 --format='%B' `  # Let's trim the empty lines from this git output
>> | % { $_.Trim() } `                                       # Trim any pre/post-whitespace
>> | ? { $_ }                                                # Discard empty lines
Posted: | Source