mirror of
				https://git.sr.ht/~tsileo/microblog.pub
				synced 2025-06-05 21:59:23 +02:00 
			
		
		
		
	Complete the switch to mistletoe
This commit is contained in:
		| @@ -6,7 +6,7 @@ from typing import Any | ||||
|  | ||||
| import pydantic | ||||
| from bs4 import BeautifulSoup  # type: ignore | ||||
| from markdown import markdown | ||||
| from mistletoe import markdown  # type: ignore | ||||
|  | ||||
| from app import activitypub as ap | ||||
| from app.actor import LOCAL_ACTOR | ||||
| @@ -176,7 +176,7 @@ class Object: | ||||
|  | ||||
|         # PeerTube returns the content as markdown | ||||
|         if self.ap_object.get("mediaType") == "text/markdown": | ||||
|             content = markdown(content, extensions=["mdx_linkify"]) | ||||
|             content = markdown(content) | ||||
|  | ||||
|         return content | ||||
|  | ||||
|   | ||||
| @@ -12,7 +12,7 @@ from fastapi import HTTPException | ||||
| from fastapi import Request | ||||
| from itsdangerous import URLSafeTimedSerializer | ||||
| from loguru import logger | ||||
| from markdown import markdown | ||||
| from mistletoe import markdown  # type: ignore | ||||
|  | ||||
| from app.utils.emoji import _load_emojis | ||||
| from app.utils.version import get_version_commit | ||||
| @@ -158,9 +158,7 @@ ALSO_KNOWN_AS = CONFIG.also_known_as | ||||
|  | ||||
| INBOX_RETENTION_DAYS = CONFIG.inbox_retention_days | ||||
| CUSTOM_FOOTER = ( | ||||
|     markdown( | ||||
|         CONFIG.custom_footer.replace("{version}", VERSION), extensions=["mdx_linkify"] | ||||
|     ) | ||||
|     markdown(CONFIG.custom_footer.replace("{version}", VERSION)) | ||||
|     if CONFIG.custom_footer | ||||
|     else None | ||||
| ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user