mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-16 00:52:04 +03:00
updated a bit
This commit is contained in:
parent
22c3ae0157
commit
c5db76b238
@ -77,10 +77,6 @@ export const markDown2Html = (input) => {
|
||||
output = handleATag(output);
|
||||
}
|
||||
|
||||
// if (copiedPostRegex.test(output)) {
|
||||
// output = handleCopiedPost(output);
|
||||
// }
|
||||
|
||||
if (markdownLinkRegex.test(output)) {
|
||||
output = handleMarkdownLink(output);
|
||||
}
|
||||
@ -130,24 +126,6 @@ const handleATag = input => input.replace(aTagRegex, (link) => {
|
||||
return link;
|
||||
});
|
||||
|
||||
const handleCopiedPost = input => input.replace(copiedPostRegex, (link) => {
|
||||
const postMatch = link.match(copiedPostRegex);
|
||||
|
||||
if (postMatch) {
|
||||
let tag = postMatch[1];
|
||||
|
||||
if (tag === '/busy.org') {
|
||||
tag = 'busy';
|
||||
}
|
||||
|
||||
return `<a class="markdown-post-link" href="${
|
||||
postMatch[3]
|
||||
}" data_tag={${tag.trim()}} data_author="${postMatch[2].replace('@', '')}">/${
|
||||
postMatch[3]
|
||||
}</a>`;
|
||||
}
|
||||
});
|
||||
|
||||
const handleMarkdownLink = input => input.replace(markdownLinkRegex, (link) => {
|
||||
const postMatch = link.match(copiedPostRegex);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user