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(