added regex to replace multiple empty lines of source code when using document.write and friends