From e243daae9162f55aae0e0d2b3ae0cbfc5f15f4ad Mon Sep 17 00:00:00 2001 From: crossdark Date: Sat, 5 Oct 2024 14:00:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20CrossDown/Core.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CrossDown/Core.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CrossDown/Core.py b/CrossDown/Core.py index fab0618..49d062e 100644 --- a/CrossDown/Core.py +++ b/CrossDown/Core.py @@ -90,8 +90,7 @@ class ID(InlineProcessor): 初始化 :param pattern: 正则表达式 :param tag: html标签 - :param key: html标签属性 - :param value: html标签属性的值 + :param property: html标签属性名称 """ super().__init__(pattern) self.tag = tag @@ -99,8 +98,8 @@ class ID(InlineProcessor): def handleMatch(self, match, match_line): tag = xml.etree.ElementTree.Element(self.tag) # 创建标签 - tag.text = match.groups(1) - tag.set(self.property, match.groups(2)) + tag.text = match.groups(1) # 设置标签内容 + tag.set(self.property, match.groups(2)) # 设置标签属性 return tag, match.start(), match.end()