Skip to content

Commit

Permalink
fix(doc): command mentions and custom emojis syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
ZRunner committed Dec 15, 2024
1 parent 9284daa commit 3bf509a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/changelog_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ def _convert_to_rst(text: str):
text = re.sub(r"`([^`]+)`", r"``\1``", text)
# convert markdown links
text = re.sub(r"\[([^\]]+)\]\(<?([^>)]+)>?\)", r"`\1 <\2>`__", text)
# convert discord custom emojis
text = re.sub(r"<a?:(\w+):\d+>", '', text).replace(" ", " ")
# convert discord command mentions
text = re.sub(r"</([\w ]+):\d+>", r"``/\1``", text)
return text

if __name__ == "__main__":
Expand Down

0 comments on commit 3bf509a

Please sign in to comment.