Compare commits
No commits in common. "implement_markdown_rendering" and "implement_auth" have entirely different histories.
implement_
...
implement_
|
|
@ -2,7 +2,6 @@ import asyncio
|
||||||
from html import escape
|
from html import escape
|
||||||
import json
|
import json
|
||||||
from typing import Any, Dict, Tuple, List, Awaitable, Callable
|
from typing import Any, Dict, Tuple, List, Awaitable, Callable
|
||||||
import markdown
|
|
||||||
|
|
||||||
from aiohttp import ClientTimeout
|
from aiohttp import ClientTimeout
|
||||||
from maubot import MessageEvent, Plugin
|
from maubot import MessageEvent, Plugin
|
||||||
|
|
@ -640,11 +639,9 @@ class NtfyBot(Plugin):
|
||||||
if click and not title:
|
if click and not title:
|
||||||
html_content += "%s<a href=\"%s\">%s</a>" % (
|
html_content += "%s<a href=\"%s\">%s</a>" % (
|
||||||
emoji, escape(click),
|
emoji, escape(click),
|
||||||
markdown.markdown(escape(body))
|
escape(body).replace("\n", "<br />"))
|
||||||
.replace("\n", "<br />"))
|
|
||||||
else:
|
else:
|
||||||
html_content += (emoji + markdown.markdown(escape(body))
|
html_content += emoji + escape(body).replace("\n", "<br />")
|
||||||
.replace("\n", "<br />"))
|
|
||||||
|
|
||||||
# add non-emoji tags
|
# add non-emoji tags
|
||||||
if tags:
|
if tags:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue