From 9e609b1751f2e2db18c0d7f56010b21401849d3f Mon Sep 17 00:00:00 2001 From: Tomoto Shimizu Washio Date: Mon, 9 Dec 2024 01:12:01 +0900 Subject: [PATCH] fix: flip the condition in strip_comment for fixed format --- fortls/parsers/internal/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortls/parsers/internal/parser.py b/fortls/parsers/internal/parser.py index 5095a6d4..d63cfe4d 100644 --- a/fortls/parsers/internal/parser.py +++ b/fortls/parsers/internal/parser.py @@ -1137,7 +1137,7 @@ def get_code_line( def strip_comment(self, line: str) -> str: """Strip comment from line""" if self.fixed: - if FRegex.FIXED_COMMENT.match(line) and FRegex.FIXED_OPENMP.match(line): + if FRegex.FIXED_COMMENT.match(line) and not FRegex.FIXED_OPENMP.match(line): return "" else: if FRegex.FREE_OPENMP.match(line) is None: