From 1372d195fcc3c73849f9c1520e31462840de5b47 Mon Sep 17 00:00:00 2001 From: Meekdai Date: Tue, 5 Sep 2023 22:13:08 +0800 Subject: [PATCH] Update Gmeek.py --- Gmeek.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gmeek.py b/Gmeek.py index f792043..9c9d666 100644 --- a/Gmeek.py +++ b/Gmeek.py @@ -94,11 +94,6 @@ class GMEEK(): post_body=self.markdown2html(f.read()) f.close() - if "highlight" in post_body: - postBase["highlight"]=1 - else: - postBase["highlight"]=0 - postBase=self.blogBase.copy() postBase["postTitle"]=issue["postTitle"] postBase["postBody"]=post_body @@ -108,6 +103,11 @@ class GMEEK(): postBase["top"]=issue["top"] postBase["postSourceUrl"]=issue["postSourceUrl"] postBase["repoName"]=options.repo_name + + if "highlight" in post_body: + postBase["highlight"]=1 + else: + postBase["highlight"]=0 self.renderHtml('post.html',postBase,{},issue["htmlDir"]) print("create postPage title=%s file=%s " % (issue["postTitle"],issue["htmlDir"]))