Skip to content

Commit 5f36189

Browse files
committed
Update project/package name
1 parent 07ecd62 commit 5f36189

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# markdown-mermaid-cli
1+
# markdown-mermaid-data-uri
22

33
[Mermaid](https://mermaid.js.org/) extension for [Python-Markdown](https://python-markdown.github.io/) using [mermaid-cli](https://github.com/mermaid-js/mermaid-cli).
44

5-
Mermaid code blocks are converted to SVG and treated as [data: URLs](https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Schemes/data). This allows for PDF generation with tools like [WeasyPrint](https://weasyprint.org/) without the need for JavaScript, even during web browsing.
5+
Mermaid code blocks are converted to SVG and treated as [data: URI](https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Schemes/data). This allows for PDF generation with tools like [WeasyPrint](https://weasyprint.org/) without the need for JavaScript, even during web browsing.
66

77
## Install
88

99
```sh
10-
pip install git+https://github.com/hkato/markdown-mermaid-cli.git
10+
pip install git+https://github.com/hkato/markdown-mermaid-data-uri.git
1111
```
1212

1313
```sh
@@ -18,7 +18,7 @@ npm install -g @mermaid-js/mermaid-cli
1818

1919
````python
2020
import markdown
21-
from markdown_mermaid_cli.extension import MermaidCLIExtension
21+
from markdown_mermaid_cli.extension import MermaidDataURIExtension
2222

2323
markdown_text = """```mermaid
2424
sequenceDiagram
@@ -34,7 +34,7 @@ sequenceDiagram
3434
Bob-->>John: Jolly good!
3535
```"""
3636

37-
html_output = markdown.markdown(markdown_text, extensions=[MermaidCLIExtension()])
37+
html_output = markdown.markdown(markdown_text, extensions=[MermaidDataURIExtension()])
3838
print(html_output)
3939
````
4040

@@ -52,5 +52,5 @@ print(html_output)
5252
```yaml
5353
# mkdocs.yml
5454
markdown_extensions:
55-
- markdown_mermaid_cli
55+
- markdown_mermaid_data_uri
5656
```

mkdocs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
site_name: Mermaid extension for Python-Markdown
22
site_author: Hideyuki KATO
3-
repo_url: https://github.com/hkato/markdown-mermaid-cli
4-
repo_name: hkato/markdown-mermaid-cli
3+
repo_url: https://github.com/hkato/markdown-mermaid-data-uri
4+
repo_name: hkato/markdown-mermaid-data-uri
55
copyright: Copyright © 2025 Hideyuki KATO
66

77
theme:
@@ -13,7 +13,7 @@ markdown_extensions:
1313
- admonition
1414
- pymdownx.details
1515
- pymdownx.superfences
16-
- markdown_mermaid_cli
16+
- markdown_mermaid_data_uri
1717

1818
plugins:
1919
- search

src/markdown_mermaid_cli/__init__.py

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""Markdown Mermaid Data URI extension."""
2+
3+
from .extension import MermaidDataURIExtension, makeExtension
4+
5+
__all__ = ['MermaidDataURIExtension', 'makeExtension']

src/markdown_mermaid_cli/extension.py renamed to src/markdown_mermaid_data_uri/extension.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from markdown.preprocessors import Preprocessor
1111

1212

13-
class MermaidCLIPreprocessor(Preprocessor):
13+
class MermaidDataURIPreprocessor(Preprocessor):
1414
"""Preprocessor to convert mermaid code blocks to SVG images."""
1515

1616
def __init__(self, config, md=None):
@@ -84,16 +84,16 @@ def _mermaid2svg(self, mermaid_code: str) -> str:
8484
os.remove(svg_filepath)
8585

8686

87-
class MermaidCLIExtension(Extension):
87+
class MermaidDataURIExtension(Extension):
8888
"""Markdown Extension to support Mermaid diagrams."""
8989

9090
def extendMarkdown(self, md):
9191
config = self.getConfigs()
92-
mermaid_preprocessor = MermaidCLIPreprocessor(config, md)
92+
mermaid_preprocessor = MermaidDataURIPreprocessor(config, md)
9393
md.preprocessors.register(mermaid_preprocessor, 'mermaid', 50)
9494

9595

9696
# pylint: disable=C0103
9797
def makeExtension(**kwargs):
98-
"""Create an instance of the MermaidCLIExtension."""
99-
return MermaidCLIExtension(**kwargs)
98+
"""Create an instance of the MermaidDataURIExtension."""
99+
return MermaidDataURIExtension(**kwargs)
File renamed without changes.

0 commit comments

Comments
 (0)