From 88e434cb267a3dd3655bd2f8f9a1d11b55a9a0b9 Mon Sep 17 00:00:00 2001 From: Meekdai Date: Tue, 28 May 2024 18:13:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=87=E7=AB=A0=E9=A1=B5?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89html=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ##{"html":""}## --- Gmeek.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Gmeek.py b/Gmeek.py index a2f4454..ebc80e1 100644 --- a/Gmeek.py +++ b/Gmeek.py @@ -8,6 +8,7 @@ import shutil import urllib import requests import argparse +import html from github import Github from xpinyin import Pinyin from feedgen.feed import FeedGenerator @@ -158,6 +159,9 @@ class GMEEK(): f'color: var(--fgColor-{style},var(--color-{style}-fg));}}' ) + if '##{"html":' in post_body: + post_body=re.sub(r'##\{"html":"(.*?)"\}##',lambda x: html.unescape(x.group(1)),post_body,flags=re.DOTALL) + postBase["postTitle"]=issue["postTitle"] postBase["postUrl"]=self.blogBase["homeUrl"]+"/"+issue["postUrl"] postBase["description"]=issue["description"]