Skip to content

Commit 6683351

Browse files
authored
🐛 FIX: "See also" admonition class (#24)
1 parent 56bd6d1 commit 6683351

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/directives/admonitions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ class BaseAdmonition extends Directive {
2828
block: true
2929
})
3030
adToken.attrSet("class", "admonition")
31-
if (this.title) adToken.attrJoin("class", this.title.toLowerCase())
31+
if (this.title)
32+
adToken.attrJoin("class", this.title.toLowerCase().replace(/ /g, ""))
3233
if (data.options.class) {
3334
adToken.attrJoin("class", data.options.class.join(" "))
3435
}

tests/fixtures/directives.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ Some *content*
2222
</aside>
2323
.
2424

25+
admonition
26+
.
27+
```{seealso}
28+
See other things here!
29+
```
30+
.
31+
<aside class="admonition seealso">
32+
<header class="admonition-title">See Also</header>
33+
<p>See other things here!</p>
34+
</aside>
35+
.
36+
2537
nested-admonition
2638
.
2739
````{note} This is a note

0 commit comments

Comments
 (0)