Skip to content

Commit

Permalink
Added support for <mark> tags on markdown text
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajordat committed Jul 3, 2024
1 parent c396523 commit 5c130e9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion alteredbuilder/config/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.4.13"
__version__ = "1.4.14"
7 changes: 6 additions & 1 deletion alteredbuilder/decks/templatetags/markdown_extras.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# import re

from django import template
from django.template.defaultfilters import stringfilter

Expand All @@ -17,4 +19,7 @@ def markdown(value: str) -> str:
Returns:
str: HTML code version of the received string.
"""
return md.markdown(value, extensions=["markdown.extensions.fenced_code"])
# print(value)
# matches = re.finditer(r"(?:\[\[(?P<reference>.*?)\]\])", value)
# print([x.group("reference") for x in matches])
return md.markdown(value, extensions=["markdown.extensions.fenced_code", "markdown_mark"])
1 change: 1 addition & 0 deletions alteredbuilder/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ grpcio-status==1.62.1
gunicorn==21.2.0
idna==3.6
Markdown==3.5.2
markdown_mark==0.0.1
mypy-extensions==1.0.0
nose==1.3.7
oauthlib==3.2.2
Expand Down

0 comments on commit 5c130e9

Please sign in to comment.