fix: code cleanup, fix getCurrentCommand

This commit is contained in:
Aviral Dasgupta 2016-07-04 21:44:35 +05:30
parent cccc58b47f
commit 30b7efd585
5 changed files with 16 additions and 15 deletions

View file

@ -33,13 +33,12 @@ const STYLES = {
const MARKDOWN_REGEX = {
LINK: /(?:\[([^\]]+)\]\(([^\)]+)\))|\<(\w+:\/\/[^\>]+)\>/g,
ITALIC: /([\*_])([\w\s]+?)\1/g,
BOLD: /([\*_])\1([\w\s]+?)\1\1/g
BOLD: /([\*_])\1([\w\s]+?)\1\1/g,
};
const USERNAME_REGEX = /@\S+:\S+/g;
const ROOM_REGEX = /#\S+:\S+/g;
let EMOJI_REGEX = null;
window.EMOJI_REGEX = EMOJI_REGEX = new RegExp(emojione.unicodeRegexp, 'g');
const EMOJI_REGEX = new RegExp(emojione.unicodeRegexp, 'g');
export function contentStateToHTML(contentState: ContentState): string {
return contentState.getBlockMap().map((block) => {