From 9638497fcca4c909a06f705a1de8e979f0a58a92 Mon Sep 17 00:00:00 2001 From: Wheeler Law Date: Mon, 14 Mar 2016 09:39:45 -0600 Subject: [PATCH] Instead of just removing an empty node, convert it to an ' ' for when dynamically prettifying code --- src/run_prettify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/run_prettify.js b/src/run_prettify.js index 8833b34f..923f7329 100644 --- a/src/run_prettify.js +++ b/src/run_prettify.js @@ -1349,7 +1349,7 @@ var IN_GLOBAL_SCOPE = false; breakAfter(node); if (!firstLine) { // Don't leave blank text nodes in the DOM. - node.parentNode.removeChild(node); + node.parentNode.innerHTML = " "; } } }