mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-14 11:37:59 +00:00
remove unnecessary method
This commit is contained in:
parent
7673920141
commit
594af5658b
|
@ -20,7 +20,7 @@ if TYPE_CHECKING:
|
||||||
|
|
||||||
|
|
||||||
class Template(Environment):
|
class Template(Environment):
|
||||||
_render_markdown: Callable[[str], str]
|
render_markdown: Callable[[str], str]
|
||||||
|
|
||||||
|
|
||||||
def __init__(self, app: Application):
|
def __init__(self, app: Application):
|
||||||
|
@ -58,10 +58,6 @@ class Template(Environment):
|
||||||
return self.get_template(path).render(new_context)
|
return self.get_template(path).render(new_context)
|
||||||
|
|
||||||
|
|
||||||
def render_markdown(self, text: str) -> str:
|
|
||||||
return self._render_markdown(text)
|
|
||||||
|
|
||||||
|
|
||||||
class MarkdownExtension(Extension):
|
class MarkdownExtension(Extension):
|
||||||
tags = {'markdown'}
|
tags = {'markdown'}
|
||||||
extensions = (
|
extensions = (
|
||||||
|
@ -75,7 +71,7 @@ class MarkdownExtension(Extension):
|
||||||
Extension.__init__(self, environment)
|
Extension.__init__(self, environment)
|
||||||
self._markdown = Markdown(extensions = MarkdownExtension.extensions)
|
self._markdown = Markdown(extensions = MarkdownExtension.extensions)
|
||||||
environment.extend(
|
environment.extend(
|
||||||
_render_markdown = self._render_markdown
|
render_markdown = self._render_markdown
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue