Skip to content

Commit 6bd07e2

Browse files
committed
notes
1 parent aa9dc0a commit 6bd07e2

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

packages/rehype-vizdom/README.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# @beoe/rehype-vizdom
22

33
> [!WARNING]
4-
> Doesn't work because `@vizdom/vizdom-ts-esm` uses [WebAssembly/ES Module Integration](https://github.com/WebAssembly/esm-integration/tree/main/proposals/esm-integration) proposal, which is not supported by [Vite](https://github.com/vitejs/vite/discussions/7763) and the plugin [doesn't seem to work with Vitest](https://github.com/Menci/vite-plugin-wasm/issues/56#issuecomment-2253169420)
4+
> Not published
55
66
Rehype plugin to generate [Vizdom](https://github.com/vizdom-dev/vizdom) diagrams (as inline SVGs) in place of code fences. This
77

88
````md
9-
```dot
9+
```vizdom
1010
digraph G { Hello -> World }
1111
```
1212
````
@@ -72,7 +72,7 @@ Plus you can pass [class](https://vizdom.org/docs/attrs/class/) to Edges and Nod
7272

7373
To remove background use:
7474

75-
```dot
75+
```vizdom
7676
digraph G {
7777
bgcolor="transparent"
7878
}
@@ -82,7 +82,7 @@ digraph G {
8282

8383
To remove `title` (which shows as tooltip when you hover mouse) use:
8484

85-
```dot
85+
```vizdom
8686
digraph G {
8787
node[tooltip=" "]
8888
}
@@ -92,10 +92,14 @@ digraph G {
9292

9393
Inline SVG can contain HTML links:
9494

95-
```dot
95+
```vizdom
9696
digraph G {
9797
node[URL="https://example.com"]
9898
}
9999
```
100100

101101
## TODO
102+
103+
- [ ] Test with all examples from https://vizdom.dev/editor/view
104+
- [ ] add a way to pass "Layout Settings"
105+
- [ ] update readme

packages/rehype-vizdom/src/vizdom.ts

-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ const svgoConfig: SvgoConfig = {
2020
};
2121

2222
/**
23-
* removes `<?xml version="1.0" encoding="UTF-8" standalone="no"?>`
24-
* removes `<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"`
2523
* removes `width="..." height="..."` from svg tag
2624
* minifies SVG with `SVGO`
2725
* wraps in a figure with class `beoe vizdom`

0 commit comments

Comments
 (0)