@orangecheck/legal 0.1.0 → 0.1.1

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 CHANGED
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import Link from 'next/link';
3
2
  import { jsxs, jsx } from 'react/jsx-runtime';
4
3
 
5
4
  // src/constants.ts
@@ -1778,23 +1777,17 @@ function renderInline(text) {
1778
1777
  if (link) {
1779
1778
  const label = link[1] ?? "";
1780
1779
  const href = link[2] ?? "";
1781
- if (/^https?:\/\//.test(href)) {
1782
- return /* @__PURE__ */ jsx(
1783
- "a",
1784
- {
1785
- href,
1786
- target: "_blank",
1787
- rel: "noopener noreferrer",
1788
- className: "text-primary underline",
1789
- children: label
1790
- },
1791
- i
1792
- );
1793
- }
1794
- if (href.startsWith("mailto:")) {
1795
- return /* @__PURE__ */ jsx("a", { href, className: "text-primary underline", children: label }, i);
1796
- }
1797
- return /* @__PURE__ */ jsx(Link, { href, className: "text-primary underline", children: label }, i);
1780
+ const external = /^https?:\/\//.test(href);
1781
+ return /* @__PURE__ */ jsx(
1782
+ "a",
1783
+ {
1784
+ href,
1785
+ className: "text-primary underline",
1786
+ ...external ? { target: "_blank", rel: "noopener noreferrer" } : {},
1787
+ children: label
1788
+ },
1789
+ i
1790
+ );
1798
1791
  }
1799
1792
  return /* @__PURE__ */ jsx(React.Fragment, { children: part }, i);
1800
1793
  });