FIX: JSHint
This commit is contained in:
parent
1113b8d7a8
commit
db2283b9d3
|
@ -47,13 +47,16 @@ function processTextNodes(node, event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var result = textContent;
|
var result = textContent;
|
||||||
emitters.forEach(function (e) {
|
|
||||||
result = e(result, event)
|
for (var k=0; k<emitters.length; k++) {
|
||||||
});
|
result = emitters[k](result, event);
|
||||||
|
}
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
if (result instanceof Array) {
|
if (result instanceof Array) {
|
||||||
result.forEach(function (r) { skipSanitize[r] = true; });
|
for (var i=0; i<result.length; i++) {
|
||||||
|
skipSanitize[result[i]] = true;
|
||||||
|
}
|
||||||
node.splice.apply(node, [j, 1].concat(result));
|
node.splice.apply(node, [j, 1].concat(result));
|
||||||
} else {
|
} else {
|
||||||
node[j] = result;
|
node[j] = result;
|
||||||
|
@ -146,7 +149,7 @@ Discourse.Dialect = {
|
||||||
cook: function(text, opts) {
|
cook: function(text, opts) {
|
||||||
if (!initialized) { initializeDialects(); }
|
if (!initialized) { initializeDialects(); }
|
||||||
dialect.options = opts;
|
dialect.options = opts;
|
||||||
var tree = parser.toHTMLTree(text, 'Discourse');
|
var tree = parser.toHTMLTree(text, 'Discourse'),
|
||||||
html = parser.renderJsonML(parseTree(tree));
|
html = parser.renderJsonML(parseTree(tree));
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
|
|
Loading…
Reference in New Issue