@selfcommunity/react-ui 0.7.37-alpha.1 → 0.7.38-alpha.0

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.
@@ -59,7 +59,7 @@ exports.getContributionSnippet = getContributionSnippet;
59
59
  */
60
60
  function getContributionHtml(html, handleUrl) {
61
61
  const _html = html.replace(/<p\b[^>]*>(.*?)<\/p>/g, (match, content) => content);
62
- return _html.replace(/<mention.*? id="([0-9]+)"{1}.*?>@([a-z\d_]+)<\/mention>/gi, (match, id, username) => {
62
+ return _html.replace(/<mention.*? id="([0-9]+)"{1}.*?>@([a-z\d_-]+)<\/mention>/gi, (match, id, username) => {
63
63
  return `<a href='${handleUrl(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, { id, username })}'>@${username}</a>`;
64
64
  });
65
65
  }
@@ -52,7 +52,7 @@ export function getContributionSnippet(obj) {
52
52
  */
53
53
  export function getContributionHtml(html, handleUrl) {
54
54
  const _html = html.replace(/<p\b[^>]*>(.*?)<\/p>/g, (match, content) => content);
55
- return _html.replace(/<mention.*? id="([0-9]+)"{1}.*?>@([a-z\d_]+)<\/mention>/gi, (match, id, username) => {
55
+ return _html.replace(/<mention.*? id="([0-9]+)"{1}.*?>@([a-z\d_-]+)<\/mention>/gi, (match, id, username) => {
56
56
  return `<a href='${handleUrl(SCRoutes.USER_PROFILE_ROUTE_NAME, { id, username })}'>@${username}</a>`;
57
57
  });
58
58
  }