Linting
This commit is contained in:
parent
004d4828f8
commit
89afcfd897
7 changed files with 23 additions and 17 deletions
|
@ -21,14 +21,14 @@ class HistoryItem {
|
|||
let {message} = this;
|
||||
if (format === 'markdown') {
|
||||
if (this.format === 'html') {
|
||||
message = _flow([RichText.HTMLtoContentState, RichText.stateToMarkdown])(message);
|
||||
message = _flow([RichText.htmlToContentState, RichText.stateToMarkdown])(message);
|
||||
}
|
||||
return ContentState.createFromText(message);
|
||||
} else {
|
||||
if (this.format === 'markdown') {
|
||||
message = new Markdown(message).toHTML();
|
||||
}
|
||||
return RichText.HTMLtoContentState(message);
|
||||
return RichText.htmlToContentState(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue