What about indented comments or lines that are all whitespace? I don't see any trimming happening.

What about lone trailing close curlies?