@selfcommunity/react-ui 0.11.0-alpha.5 → 0.11.0-alpha.6
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.
|
@@ -57,8 +57,7 @@ exports.getContributionSnippet = getContributionSnippet;
|
|
|
57
57
|
* @param handleUrl Func that handle urls
|
|
58
58
|
*/
|
|
59
59
|
function getContributionHtml(html, handleUrl) {
|
|
60
|
-
|
|
61
|
-
return _html.replace(/<mention.*? id="([0-9]+)"{1}.*?>@([a-z\d_-]+)<\/mention>/gi, (match, id, username) => {
|
|
60
|
+
return html.replace(/<mention.*? id="([0-9]+)"{1}.*?>@([a-z\d_-]+)<\/mention>/gi, (match, id, username) => {
|
|
62
61
|
return `<a href='${handleUrl(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, { id, username })}'>@${username}</a>`;
|
|
63
62
|
});
|
|
64
63
|
}
|
|
@@ -51,8 +51,7 @@ export function getContributionSnippet(obj) {
|
|
|
51
51
|
* @param handleUrl Func that handle urls
|
|
52
52
|
*/
|
|
53
53
|
export function getContributionHtml(html, handleUrl) {
|
|
54
|
-
|
|
55
|
-
return _html.replace(/<mention.*? id="([0-9]+)"{1}.*?>@([a-z\d_-]+)<\/mention>/gi, (match, id, username) => {
|
|
54
|
+
return html.replace(/<mention.*? id="([0-9]+)"{1}.*?>@([a-z\d_-]+)<\/mention>/gi, (match, id, username) => {
|
|
56
55
|
return `<a href='${handleUrl(SCRoutes.USER_PROFILE_ROUTE_NAME, { id, username })}'>@${username}</a>`;
|
|
57
56
|
});
|
|
58
57
|
}
|