@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.
Files changed (2) hide show
  1. package/dist/index.mjs +17 -7
  2. 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
- text += "\uFFFC";
2271
- annotations.push({
2272
- type: "Embed",
2273
- starts: [start],
2274
- ends: [text.length],
2275
- link: inner
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seed-hypermedia/client",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/seed-hypermedia/seed",