File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class MDBookSidebarScrollbox extends HTMLElement {
1010 connectedCallback() {
1111 this.innerHTML = '{{ #toc }} {{ /toc }} ';
1212 // Set the current, active page, and reveal it if it's hidden
13- let current_page = document.location.href.toString().split("#")[0];
13+ let current_page = document.location.href.toString().split("#")[0].split("?")[0] ;
1414 if (current_page.endsWith("/")) {
1515 current_page += "index.html";
1616 }
Original file line number Diff line number Diff line change 1+ // This GUI test checks the active page sidebar highlight.
2+
3+ go-to: |DOC_PATH| + "index.html"
4+
5+ assert-text: ("mdbook-sidebar-scrollbox a.active", "Prefix Chapter")
6+
7+ go-to: |DOC_PATH| + "individual/index.html"
8+
9+ assert-text: ("mdbook-sidebar-scrollbox a.active", "3. Markdown Individual tags")
10+
11+ go-to: |DOC_PATH| + "index.html?highlight=test"
12+
13+ assert-text: ("mdbook-sidebar-scrollbox a.active", "Prefix Chapter")
14+
15+ go-to: |DOC_PATH| + "individual/index.html?highlight=test"
16+
17+ assert-text: ("mdbook-sidebar-scrollbox a.active", "3. Markdown Individual tags")
You can’t perform that action at this time.
0 commit comments