changeset 236:5e5aac8160d0

Recognize comments only if the comment char is the first non-whitespace character in the line
author Franz Glasner <hg@dom66.de>
date Wed, 31 Oct 2018 09:00:41 +0100
parents 027dceaf3de5
children 9249ca818ddf
files extensions/timestamps.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/extensions/timestamps.py	Tue Oct 30 09:32:46 2018 +0100
+++ b/extensions/timestamps.py	Wed Oct 31 09:00:41 2018 +0100
@@ -436,7 +436,7 @@
                     sf.append(c2)
                     c2 = fp.read(1)
             field = sf
-        elif not field and c == '#':
+        elif not record and not field and c == '#':
             # comment: `#' at the beginning of a line
             comment = ['#']
             while True: