Skip to content

Commit

Permalink
Merge pull request #62 from sudoskys/dev
Browse files Browse the repository at this point in the history
✨ feat(app): update Mermaid theme to default
  • Loading branch information
sudoskys authored Feb 14, 2025
2 parents 4f8da04 + a995be0 commit b50a47f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "telegramify-markdown"
version = "0.4.1"
version = "0.4.2"
description = "Makes it easy to send Markdown in Telegram MarkdownV2 style"
authors = [
{ name = "sudoskys", email = "[email protected]" },
Expand Down
6 changes: 3 additions & 3 deletions src/telegramify_markdown/mermaid.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

@dataclasses.dataclass
class MermaidConfig:
theme: str = "neutral"
theme: str = "default"


async def download_image(
Expand Down Expand Up @@ -136,7 +136,7 @@ def b64_mermaid_url(diagram: str) -> str:
:return: Link
"""
diagram_encoded = safe_base64_encode(diagram.encode('utf8')).decode('ascii')
return f'https://mermaid.ink/img/{diagram_encoded}?theme=neutral&width=500&scale=2'
return f'https://mermaid.ink/img/{diagram_encoded}?theme=default&width=500&scale=2'


def get_mermaid_live_url(graph_markdown: str) -> str:
Expand All @@ -156,7 +156,7 @@ def get_mermaid_ink_url(graph_markdown: str) -> str:
:param graph_markdown: The Mermaid graph Markdown
:return: Link
"""
return f'https://mermaid.ink/img/{generate_pako(graph_markdown)}?theme=neutral&width=500&scale=2&type=webp'
return f'https://mermaid.ink/img/{generate_pako(graph_markdown)}?theme=default&width=500&scale=2&type=webp'


async def render_mermaid(
Expand Down

0 comments on commit b50a47f

Please sign in to comment.