diff --git a/sos/cleaner/__init__.py b/sos/cleaner/__init__.py
index <HASH>..<HASH> 100644
--- a/sos/cleaner/__init__.py
+++ b/sos/cleaner/__init__.py
@@ -603,8 +603,6 @@ third party.
         tfile = tempfile.NamedTemporaryFile(mode='w', dir=self.tmpdir)
         with open(filename, 'r') as fname:
             for line in fname:
-                if not line.strip():
-                    continue
                 try:
                     line, count = self.obfuscate_line(line)
                     subs += count
@@ -642,7 +640,11 @@ third party.
 
         Returns the fully obfuscated line and the number of substitutions made
         """
+        # don't iterate over blank lines, but still write them to the tempfile
+        # to maintain the same structure when we write a scrubbed file back
         count = 0
+        if not line.strip():
+            return line, count
         for parser in self.parsers:
             try:
                 line, _count = parser.parse_line(line)
[cleaner] Don't strip empty lines from substituted files

Fixes an issue where empty lines would be stripped from files that have
other obfuscations in them. Those empty lines may be important for file
structure and/or readability, so we should instead simply not pass empty
lines to the parsers rather than skipping them wholesale in the flow of
writing obfuscations to a temp file before replacing the source file
with a potentially changed temp file.

Resolves: #<I>