odaptos_design_system 2.0.347 → 2.0.348

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.js CHANGED
@@ -302,9 +302,16 @@ const renderInlineMarkdown = (rawText) => {
302
302
  });
303
303
  };
304
304
  const renderHtmlUnderline = (text) => {
305
+ const renderUnderlineContent = (underlineText) => {
306
+ const tripleStarAsStrongNodes = underlineText.split(/\*\*\*([^*]+)\*\*\*/g).map((part, index) => {
307
+ if (!(index % 2 === 1)) return part;
308
+ return /* @__PURE__ */ React.createElement("strong", { key: `u-strong-em-from-triple-${index}` }, /* @__PURE__ */ React.createElement("em", null, part));
309
+ });
310
+ return renderStrongAndEm(tripleStarAsStrongNodes);
311
+ };
305
312
  return text.split(/<u>(.*?)<\/u>/g).map((part, index) => {
306
313
  if (!(index % 2 === 1)) return part;
307
- return /* @__PURE__ */ React.createElement("u", { key: `u-html-${index}` }, part);
314
+ return /* @__PURE__ */ React.createElement("u", { key: `u-html-${index}` }, renderUnderlineContent(part));
308
315
  });
309
316
  };
310
317
  const renderUnderline = (text) => {
@@ -319,6 +326,12 @@ const renderInlineMarkdown = (rawText) => {
319
326
  return /* @__PURE__ */ React.createElement("strong", { key: `strong-${index}` }, part);
320
327
  });
321
328
  };
329
+ const renderStrongAndEmphasis = (text) => {
330
+ return text.split(/\*\*\*([^*]+)\*\*\*/g).map((part, index) => {
331
+ if (!(index % 2 === 1)) return part;
332
+ return /* @__PURE__ */ React.createElement("strong", { key: `strong-em-${index}` }, /* @__PURE__ */ React.createElement("u", null, part));
333
+ });
334
+ };
322
335
  const renderEm = (text) => {
323
336
  return text.split(/\*([^*]+)\*/g).map((part, index) => {
324
337
  if (!(index % 2 === 1)) return part;
@@ -344,7 +357,10 @@ const renderInlineMarkdown = (rawText) => {
344
357
  return renderUnderline(htmlUnderlineNode);
345
358
  }).flatMap((underlineNode) => {
346
359
  if (typeof underlineNode !== "string") return [underlineNode];
347
- return renderStrong(underlineNode);
360
+ return renderStrongAndEmphasis(underlineNode);
361
+ }).flatMap((strongAndEmphasisNode) => {
362
+ if (typeof strongAndEmphasisNode !== "string") return [strongAndEmphasisNode];
363
+ return renderStrong(strongAndEmphasisNode);
348
364
  }).flatMap((strongNode) => {
349
365
  if (typeof strongNode !== "string") return [strongNode];
350
366
  return renderEm(strongNode);