Skip to content

Commit

Permalink
fix bug caused by dark theme disabled globally
Browse files Browse the repository at this point in the history
  • Loading branch information
landmaj committed Aug 21, 2024
1 parent c6324d5 commit daa13cc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ A plugin for embedding D2 diagrams in MkDocs.

## Requirements

* [MkDocs](https://www.mkdocs.org/) >= 1.5.0
* [Python](https://www.python.org/) >= 3.9
* [MkDocs](https://www.mkdocs.org/) >= 1.6.0
* [D2](https://d2lang.com) >= 0.6.3

## Installation
Expand Down
4 changes: 2 additions & 2 deletions d2/img.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ def run(self, root: etree.Element) -> Optional[etree.Element]:
# strip namespace
_, _, el.tag = el.tag.rpartition("}")

elem.clear()
elem.tag = "div"
elem.clear()
elem.set("class", "d2")

if not cfg.has_dark_theme():
elem.append(svg.root)
return
continue

dark_result, ok = self.renderer(diagram, cfg.opts(dark=True))
if not ok:
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/guide/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ Diagrams included using image tags support [imports](https://d2lang.com/tour/imp

````md
importer.d2
```d2
```
a: @imported
a -> b
```

imported.d2
```d2
```
x: {
shape: circle
}
Expand Down
3 changes: 2 additions & 1 deletion docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ A plugin for embedding D2 diagrams in MkDocs.

## Requirements

* [MkDocs](https://www.mkdocs.org/) >= 1.5.0
* [Python](https://www.python.org/) >= 3.9
* [MkDocs](https://www.mkdocs.org/) >= 1.6.0
* [D2](https://d2lang.com) >= 0.6.3

## Installation
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name="mkdocs-d2-plugin",
version="1.5.0b2",
version="1.5.0rc1",
description="MkDocs plugin for D2",
long_description=long_description,
long_description_content_type="text/markdown",
Expand All @@ -25,7 +25,7 @@
"packaging",
],
classifiers=[
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
Expand Down

0 comments on commit daa13cc

Please sign in to comment.