Migrate mistune to markdown
This commit is contained in:
parent
412945626b
commit
77aaae6735
46 changed files with 5112 additions and 420 deletions
|
@ -5,11 +5,11 @@ from judge.jinja2.markdown import markdown
|
|||
from judge.jinja2.reference import reference
|
||||
|
||||
|
||||
def generate_opengraph(cache_key, data, style):
|
||||
def generate_opengraph(cache_key, data):
|
||||
metadata = cache.get(cache_key)
|
||||
if metadata is None:
|
||||
description = None
|
||||
tree = reference(markdown(data, style)).tree
|
||||
tree = reference(markdown(data)).tree
|
||||
for p in tree.iterfind(".//p"):
|
||||
text = p.text_content().strip()
|
||||
if text:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue