fixed undefined and comments alligment

This commit is contained in:
u-e 2019-01-23 00:41:19 +03:00
parent 41c58611e2
commit 4d9958720c
3 changed files with 6 additions and 8 deletions

View File

@ -54,7 +54,7 @@ class CommentView extends PureComponent {
const { isShowSubComments } = this.state;
return (
<View style={{ marginLeft: marginLeft || 29 }}>
<View>
<PostHeaderDescription
key={comment.permlink}
date={getTimeFromNow(comment.created)}

View File

@ -1,7 +1,5 @@
import React, { PureComponent, Fragment } from 'react';
import {
Dimensions, Linking, Alert,
} from 'react-native';
import { Dimensions, Linking, Alert } from 'react-native';
import { withNavigation } from 'react-navigation';
import { injectIntl } from 'react-intl';

View File

@ -21,7 +21,7 @@ const urlRegex = /(http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/
const aTagRegex = /(<\s*a[^>]*>(.*?)<\s*[/]\s*a>)/g;
const imgTagRegex = /(<img[^>]*>)/g;
const iframeRegex = /(?:<iframe[^>]*)(?:(?:\/>)|(?:>.*?<\/iframe>))/g;
const markdownLinkRegex = /(?:__|[])|\[(.*?)\]\(.*?\)/g;
// const markdownLinkRegex = /(?:__|[])|\[(.*?)\]\(.*?\)/g;
export const markDown2Html = (input) => {
if (!input) {
@ -77,9 +77,9 @@ export const markDown2Html = (input) => {
output = handleATag(output);
}
if (markdownLinkRegex.test(output)) {
output = handleMarkdownLink(output);
}
// if (markdownLinkRegex.test(output)) {
// output = handleMarkdownLink(output);
// }
output = md.render(output);