Improve katex markdown
This commit is contained in:
parent
08d2437d49
commit
c87566673a
4 changed files with 16 additions and 19 deletions
|
@ -6,7 +6,7 @@ from pymdownx import superfences
|
|||
|
||||
|
||||
EXTENSIONS = [
|
||||
# "pymdownx.arithmatex",
|
||||
"pymdownx.arithmatex",
|
||||
"pymdownx.magiclink",
|
||||
"pymdownx.betterem",
|
||||
"pymdownx.details",
|
||||
|
@ -25,6 +25,9 @@ EXTENSIONS = [
|
|||
]
|
||||
|
||||
EXTENSION_CONFIGS = {
|
||||
"pymdownx.arithmatex": {
|
||||
"generic": True,
|
||||
},
|
||||
"pymdownx.superfences": {
|
||||
"custom_fences": [
|
||||
{
|
||||
|
@ -83,7 +86,6 @@ def markdown(value, lazy_load=False):
|
|||
value, extensions=extensions, extension_configs=EXTENSION_CONFIGS
|
||||
)
|
||||
|
||||
soup = BeautifulSoup(html, "html.parser")
|
||||
html = bleach.clean(html, tags=ALLOWED_TAGS, attributes=ALLOWED_ATTRS)
|
||||
|
||||
if not html:
|
||||
|
|
|
@ -46,7 +46,6 @@ def problem_update(sender, instance, **kwargs):
|
|||
cache.delete_many(
|
||||
[
|
||||
make_template_fragment_key("submission_problem", (instance.id,)),
|
||||
make_template_fragment_key("problem_feed", (instance.id,)),
|
||||
"problem_tls:%s" % instance.id,
|
||||
"problem_mls:%s" % instance.id,
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue