@brillout/docpress 0.10.21 → 0.10.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/components/Link.tsx
CHANGED
|
@@ -167,5 +167,7 @@ function parseHref(href: string) {
|
|
|
167
167
|
}
|
|
168
168
|
assert(hrefPathname !== null || hrefHash !== null)
|
|
169
169
|
assert(hrefPathname || hrefHash)
|
|
170
|
+
// Text highlight links e,g. #metadata:~:text=global%20or%20local.-,Global%20metadata,-.
|
|
171
|
+
if (hrefHash) hrefHash = hrefHash.split(':~:text')[0]!
|
|
170
172
|
return { hrefPathname, hrefHash }
|
|
171
173
|
}
|
package/dist/components/Link.js
CHANGED
|
@@ -132,5 +132,8 @@ function parseHref(href) {
|
|
|
132
132
|
}
|
|
133
133
|
assert(hrefPathname !== null || hrefHash !== null);
|
|
134
134
|
assert(hrefPathname || hrefHash);
|
|
135
|
+
// Text highlight links e,g. #metadata:~:text=global%20or%20local.-,Global%20metadata,-.
|
|
136
|
+
if (hrefHash)
|
|
137
|
+
hrefHash = hrefHash.split(':~:text')[0];
|
|
135
138
|
return { hrefPathname: hrefPathname, hrefHash: hrefHash };
|
|
136
139
|
}
|