From 2326d4ceb7233ddcbb98e19e2d9968a020a9c505 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 16 Dec 2013 15:21:46 -0500 Subject: [PATCH] FIX: text node emitters should always take strings as parameters even if they return JsonML. --- .../javascripts/discourse/dialects/dialect.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/discourse/dialects/dialect.js b/app/assets/javascripts/discourse/dialects/dialect.js index f797df3481e..ebf09e3d3fb 100644 --- a/app/assets/javascripts/discourse/dialects/dialect.js +++ b/app/assets/javascripts/discourse/dialects/dialect.js @@ -30,8 +30,9 @@ function initializeDialects() { @method processTextNodes @param {Array} node the JsonML tree @param {Object} event the parse node event data + @param {Function} emitter the function to call on the text node **/ -function processTextNodes(node, event) { +function processTextNodes(node, event, emitter) { if (node.length < 2) { return; } if (node[0] === '__RAW') { @@ -47,12 +48,7 @@ function processTextNodes(node, event) { textContent = Discourse.Markdown.sanitize(textContent); } - var result = textContent; - - for (var k=0; k