Skip to content

Commit 51b63bc

Browse files
committed
Directly use already parsed URL
1 parent 7d5d952 commit 51b63bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

htmlpreview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
// Get absolute URL
200200
href = a[i].href;
201201
// Check if it's an anchor
202-
if (href.indexOf('#') > 0) {
202+
if (a[i].hash.length > 0) {
203203
// Rewrite links to this document only
204204
if ((a[i].origin + a[i].pathname) == rawFileUrl) {
205205
// Then rewrite URL with support for empty anchor

0 commit comments

Comments
 (0)