We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7df608 commit 66f5c8eCopy full SHA for 66f5c8e
src/pagination.js
@@ -32,11 +32,17 @@ function findChapter (element) {
32
function findHyperlink (element) {
33
return element.href ? element : query('a', element)
34
}
35
+function normailizeLink (path) {
36
+ if (path && path.toUpperCase() === '#/README') {
37
+ return '#/'
38
+ }
39
+ return path
40
+}
41
function isALinkTo (path, element) {
42
if (arguments.length === 1) {
43
return (element) => isALinkTo(path, element)
44
- return decodeURIComponent(element.getAttribute('href').split('?')[0]) === decodeURIComponent(path)
45
+ return normailizeLink(decodeURIComponent(element.getAttribute('href').split('?')[0])) === normailizeLink(decodeURIComponent(path))
46
47
48
0 commit comments