From 933fea295545662ee83c4325d25d50e6d689fc4e Mon Sep 17 00:00:00 2001 From: Dan Flettre Date: Thu, 30 Apr 2015 00:37:22 -0500 Subject: [PATCH] remove html to vdom conversion --- lib/rich-message.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/rich-message.js b/lib/rich-message.js index 0987881..1dfa556 100644 --- a/lib/rich-message.js +++ b/lib/rich-message.js @@ -4,12 +4,9 @@ module.exports.mergeMessages = mergeMessages var emoji = require('markdown-it-emoji') var ghlink = require('ghlink') var higlight = require('highlight.js') -var htmlToVDom = require('html-to-vdom') var MarkdownIt = require('markdown-it') var twemoji = require('twemoji') var util = require('./util.js') -var VNode = require('virtual-dom/vnode/vnode') -var VText = require('virtual-dom/vnode/vtext') var md = new MarkdownIt({ linkify: true, @@ -32,15 +29,6 @@ md.renderer.rules.emoji = function (token, index) { return twemoji.parse(token[index].content) } -var convertHTML = htmlToVDom({ - VNode: VNode, - VText: VText -}) - -function makeVDom (html) { - return convertHTML('
' + html + '
') -} - function makeRichMessage (message, username) { message.anon = /Anonymous/i.test(message.username) message.avatar = message.anon @@ -57,14 +45,11 @@ function makeRichMessage (message, username) { var classStr = highlight ? ' class="highlight"' : '' message.html = '' + message.html + '' - message.vdom = makeVDom(message.html) - return message } function mergeMessages (message1, message2) { message1.text += '\n' + message2.text message1.html += '

' + message2.html - message1.vdom = makeVDom(message1.html) return message1 }