eric7/Utilities/ModuleParser.py

branch
eric7
changeset 8495
e8278859d9fd
parent 8312
800c432b34c8
child 8761
f05818ae6431
diff -r 22230c2591c3 -r e8278859d9fd eric7/Utilities/ModuleParser.py
--- a/eric7/Utilities/ModuleParser.py	Thu Jul 29 19:40:12 2021 +0200
+++ b/eric7/Utilities/ModuleParser.py	Fri Jul 30 13:43:42 2021 +0200
@@ -543,8 +543,9 @@
             # start with zero based line after start line
             while lineno < len(lines):
                 line = lines[lineno]
-                if line.strip():
-                    # line contains some text
+                if line.strip() and not line.lstrip().startswith("#"):
+                    # line contains some text and does not start with
+                    # a comment sign
                     lineIndent = _indent(line.replace(line.lstrip(), ""))
                     if lineIndent <= indent:
                         return lineno

eric ide

mercurial