From f53c338c48e2e7da428fa2d93a3285e96523d3e4 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Mon, 15 Apr 2024 16:31:25 -0500 Subject: [PATCH] Updated comment finder with @tjlaboss feedback. --- montepy/utilities.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/montepy/utilities.py b/montepy/utilities.py index 05e3b1af..e167dfef 100644 --- a/montepy/utilities.py +++ b/montepy/utilities.py @@ -45,12 +45,10 @@ def is_comment(line): non_blank_comment = upper_start and line.lstrip().upper().startswith("C ") if non_blank_comment: return True - blank_comment = ( - "C\n" == upper_start.lstrip() - or "C\r\n" == upper_start.lstrip() - or ("C" == upper_start and "\n" not in line) + blank_comment = ("C" == upper_start.strip() and "\n" in line) or ( + "C" == upper_start and "\n" not in line ) - return blank_comment or non_blank_comment + return blank_comment def make_prop_val_node(