# HG changeset patch # User Nicholas Jillings # Date 1506336426 -3600 # Node ID 49b0b1e245af3a71266e797b21636281966cd0c1 # Parent 8c7d5ee1b906bbd6bd5fbd93f94b997e15c4f37e Fix #242 diff -r 8c7d5ee1b906 -r 49b0b1e245af js/core.js --- a/js/core.js Mon Sep 25 11:00:05 2017 +0100 +++ b/js/core.js Mon Sep 25 11:47:06 2017 +0100 @@ -1082,7 +1082,15 @@ lastNodeStart = new Date(); this.popupResponse.innerHTML = ""; this.popupTitle.innerHTML = ""; - this.popupTitle.appendChild(p.parseFromString(converter.makeHtml(node.specification.statement), "text/html").getElementsByTagName("body")[0].firstElementChild); + var strings = node.specification.statement.split("\n"); + strings.forEach(function(e,i,a){ + a[i] = e.trim(); + }); + node.specification.statement = strings.join("\n"); + var statementElements = p.parseFromString(converter.makeHtml(node.specification.statement), "text/html").querySelector("body").children; + while(statementElements.length > 0) { + this.popupTitle.appendChild(statementElements[0]); + } if (node.specification.type == 'question') { postQuestion.call(this, node); } else if (node.specification.type == 'checkbox') {