Skip to content

Commit d733cb7

Browse files
committed
fix(pat scroll-marker): Do escaping for hash id selectors, so they are allowed to start with a number.
1 parent c308b66 commit d733cb7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pat/scroll-marker/scroll-marker.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ class Pattern extends BasePattern {
4141
// to create the resulting Map holding all necessary information.
4242
(it) => [
4343
it.hash.split("#")[1],
44-
{ link: it, target: document.querySelector(it.hash) },
44+
{
45+
link: it,
46+
target: document.querySelector(dom.escape_css_id(it.hash)),
47+
},
4548
]
4649
)
4750
.filter(

0 commit comments

Comments
 (0)