@elmethis/core 0.5.6 → 0.5.7

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.
@@ -82,6 +82,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
82
82
  loader: () => import("../table/ElmTableCell.vue.mjs"),
83
83
  loadingComponent: ElmBlockFallback
84
84
  });
85
+ const tokensToText = ({ tokens }) => tokens.map((token) => "text" in token ? token.text : token.raw).join("");
85
86
  const renderByToken = ({ tokens }) => {
86
87
  const results = [];
87
88
  for (const token of tokens) {
@@ -174,13 +175,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
174
175
  break;
175
176
  case "link":
176
177
  results.push(
177
- token.tokens != null && token.tokens.length !== 0 ? h(
178
- AsyncElmInlineText,
179
- { href: token.href },
180
- {
181
- default: () => renderByToken({ tokens: token.tokens })
182
- }
183
- ) : h(AsyncElmInlineText, { text: token.text, href: token.href })
178
+ token.tokens != null && token.tokens.length !== 0 ? h(AsyncElmInlineText, {
179
+ text: tokensToText({ tokens }),
180
+ href: token.href
181
+ }) : h(AsyncElmInlineText, { text: token.text, href: token.href })
184
182
  );
185
183
  break;
186
184
  case "list":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elmethis/core",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },