pro2cmake: Ignore also initial comment

Change-Id: Id0b27c2a082f78c713e43c6ca846a4fff9ab7a8c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Orgad Shaneh 2020-10-14 22:49:08 +03:00
parent 59359f6782
commit f0ab87bb43

View File

@ -68,7 +68,7 @@ def fixup_comments(contents: str) -> str:
# care of it as well, as if the commented line didn't exist in the
# first place.
contents = re.sub(r"\n[ \t]*#[^\n]*?\n", "\n", contents, re.DOTALL)
contents = re.sub(r"(^|\n)[ \t]*#[^\n]*?\n", "\n", contents, re.DOTALL)
return contents