script-publish.py: Fix double-spacing in <pre> by removing \n
authorW. Trevor King <wking@tremily.us>
Thu, 17 Jan 2013 22:06:27 +0000 (17:06 -0500)
committerW. Trevor King <wking@tremily.us>
Thu, 17 Jan 2013 22:06:27 +0000 (17:06 -0500)
This makes the HTML less readable, but it's not worth the trouble to
make these HTML-readability endlines optional.

posts/script/script-publish.py

index 4f750e481091a68eee7139cce5a84a87fc52922c..fa2574d3bd5980ab8a8bc538ffc569aed1f9e8f9 100755 (executable)
@@ -651,7 +651,10 @@ class ControlParser (object):
                 cc = chunk.control_code
                 if cc.name in ['scroll forward', 'clear screen']:
                     e = _etree.Element('br')
-                    e.tail = '\n'
+                    # the following line is useful for debugging HTML
+                    # output, but if you're inside a <pre> block,
+                    # <br/>\n will give you double-spaced lines.
+                    #e.tail = '\n'
                     element.append(e)
                     previous = e
                 else: