markdown 渲染使用gfm模式,支持GitHub的所有语法
#6 https://github.com/Meekdai/Gmeek/issues/6#issuecomment-1737281658
This commit is contained in:
parent
ccffc5a5d2
commit
b4ef9defdc
2
Gmeek.py
2
Gmeek.py
@ -73,7 +73,7 @@ class GMEEK():
|
|||||||
return user.get_repo(repo)
|
return user.get_repo(repo)
|
||||||
|
|
||||||
def markdown2html(self,mdstr):
|
def markdown2html(self,mdstr):
|
||||||
payload = {"text": mdstr, "mode": "markdown"}
|
payload = {"text": mdstr, "mode": "gfm"}
|
||||||
ret=requests.post("https://api.github.com/markdown", json=payload,headers={"Authorzation":"token {}".format(self.options.github_token)})
|
ret=requests.post("https://api.github.com/markdown", json=payload,headers={"Authorzation":"token {}".format(self.options.github_token)})
|
||||||
if ret.status_code==200:
|
if ret.status_code==200:
|
||||||
return ret.text
|
return ret.text
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user