From f0ab87bb43aeedff8671cd1ce722e258f175e2be Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 14 Oct 2020 22:49:08 +0300 Subject: [PATCH] pro2cmake: Ignore also initial comment Change-Id: Id0b27c2a082f78c713e43c6ca846a4fff9ab7a8c Reviewed-by: Joerg Bornemann --- util/cmake/qmake_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/cmake/qmake_parser.py b/util/cmake/qmake_parser.py index 73620f08902..357a529e5ae 100644 --- a/util/cmake/qmake_parser.py +++ b/util/cmake/qmake_parser.py @@ -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