Fixes to handling <pre> text content.

This commit is contained in:
Andrew n marshall
2018-06-25 10:19:29 -07:00
parent 74fda799f5
commit 2747396cd3
2 changed files with 2 additions and 2 deletions

View File

@@ -148,7 +148,7 @@ BlockFactory.updateLanguage = function() {
if (!BlockFactory.updateBlocksFlagDelayed) { if (!BlockFactory.updateBlocksFlagDelayed) {
var languagePre = document.getElementById('languagePre'); var languagePre = document.getElementById('languagePre');
var languageTA = document.getElementById('languageTA'); var languageTA = document.getElementById('languageTA');
code = languagePre.textContent.trim(); code = languagePre.innerText.trim();
languageTA.value = code; languageTA.value = code;
} }
} }

View File

@@ -889,7 +889,7 @@ FactoryUtils.injectCode = function(code, id) {
pre.textContent = code; pre.textContent = code;
code = pre.textContent; code = pre.textContent;
code = PR.prettyPrintOne(code, 'js'); code = PR.prettyPrintOne(code, 'js');
pre.textContent = code; pre.innerHTML = code;
}; };
/** /**