From 898db38f66f2b6b0047df75eaf3ced0d64cda664 Mon Sep 17 00:00:00 2001 From: pine Date: Sat, 15 Mar 2025 17:54:05 +0800 Subject: feat: ➕ Add dependency json5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/conventionalrp/core/parser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/conventionalrp/core/parser.py b/src/conventionalrp/core/parser.py index d5b91da..4d9b975 100644 --- a/src/conventionalrp/core/parser.py +++ b/src/conventionalrp/core/parser.py @@ -1,4 +1,4 @@ -import json +import json5 import re from pathlib import Path @@ -15,7 +15,7 @@ class Parser: with open(rules_path, "r", encoding="utf-8") as f: file_content = f.read() - rules = json.loads(file_content) + rules = json5.loads(file_content) # validation rule format if rules is None: @@ -54,4 +54,4 @@ class Parser: else: parsed_data.append({"content": line.strip(), "type": "unknown"}) - return parsed_data + return parsed_data \ No newline at end of file -- cgit v1.2.3-70-g09d2