From 79bd36867fbfd9a64826e6abb56fb82bc930cae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B7=A8=E8=B6=8A=E6=99=A8=E6=98=8F?= <91008228+CrossDark@users.noreply.github.com> Date: Fri, 30 Aug 2024 14:53:40 +0800 Subject: [PATCH] Update CrossDown.py --- CrossDown.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CrossDown.py b/CrossDown.py index 1fee4a9..936dfea 100644 --- a/CrossDown.py +++ b/CrossDown.py @@ -163,7 +163,9 @@ class CodeBlock: self.codes[index] = code # 给变量赋值 if re.search(r'\n', code): # 是多行代码 head = re.findall(r'(.*?)\n', code)[0] - if head == 'python': + if head in ('', 'yaml'): + pass + elif head == 'python': pass elif head == 'shell': pass