Skip to content

Commit 32aec0e

Browse files
committed
0.0.49
1 parent 9b1b908 commit 32aec0e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@observablehq/cli",
33
"license": "UNLICENSED",
4-
"version": "0.0.48",
4+
"version": "0.0.49",
55
"type": "module",
66
"publishConfig": {
77
"registry": "https://npm.pkg.github.com"

src/render.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ async function renderSidebar(title = "Home", pages: (Page | Section)[], path: st
108108
<ol>${pages.map((p, i) =>
109109
"pages" in p
110110
? html`${i > 0 && "path" in pages[i - 1] ? html`</ol>` : ""}
111-
<details${p.open || p.pages.some((p) => p.path === path) ? html` open class="observablehq-section-active"` : ""}>
111+
<details${
112+
p.pages.some((p) => p.path === path) ? html` open class="observablehq-section-active"` : p.open ? " open" : ""
113+
}>
112114
<summary>${p.name}</summary>
113115
<ol>${p.pages.map((p) => renderListItem(p, path))}
114116
</ol>

0 commit comments

Comments
 (0)