File tree 2 files changed +18
-1
lines changed
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 {
10
10
connectedCallback() {
11
11
this.innerHTML = '{{ #toc }} {{ /toc }} ';
12
12
// 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] ;
14
14
if (current_page.endsWith("/")) {
15
15
current_page += "index.html";
16
16
}
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