添加mathjax
This commit is contained in:
parent
3587c22378
commit
f1a94cada3
6
Gmeek.py
6
Gmeek.py
@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import re
|
||||
import json
|
||||
import time
|
||||
import datetime
|
||||
@ -94,6 +95,11 @@ class GMEEK():
|
||||
post_body=self.markdown2html(f.read())
|
||||
f.close()
|
||||
|
||||
if '<math-renderer' in post_body:
|
||||
post_body=re.sub(r'<math-renderer.*?>','',post_body)
|
||||
post_body=re.sub(r'</math-renderer>','',post_body)
|
||||
self.blogBase["script"]=self.blogBase["script"]+'<script async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>'
|
||||
|
||||
postBase=self.blogBase.copy()
|
||||
postBase["postTitle"]=issue["postTitle"]
|
||||
postBase["postBody"]=post_body
|
||||
|
||||
Loading…
Reference in New Issue
Block a user