@seed-hypermedia/client 0.0.23 → 0.0.24
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/dist/index.mjs +17 -7
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2267,13 +2267,23 @@ function parseInlineFormatting(raw) {
|
|
|
2267
2267
|
const inner = raw.slice(i + 1, end);
|
|
2268
2268
|
if (/^[a-zA-Z][a-zA-Z0-9+.-]*:\S*$/.test(inner) && !/[\s<>]/.test(inner)) {
|
|
2269
2269
|
const start = text.length;
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2270
|
+
if (inner.startsWith("hm://")) {
|
|
2271
|
+
text += "\uFFFC";
|
|
2272
|
+
annotations.push({
|
|
2273
|
+
type: "Embed",
|
|
2274
|
+
starts: [start],
|
|
2275
|
+
ends: [text.length],
|
|
2276
|
+
link: inner
|
|
2277
|
+
});
|
|
2278
|
+
} else {
|
|
2279
|
+
text += inner;
|
|
2280
|
+
annotations.push({
|
|
2281
|
+
type: "Link",
|
|
2282
|
+
starts: [start],
|
|
2283
|
+
ends: [text.length],
|
|
2284
|
+
link: inner
|
|
2285
|
+
});
|
|
2286
|
+
}
|
|
2277
2287
|
i = end + 1;
|
|
2278
2288
|
continue;
|
|
2279
2289
|
}
|