Closed emilioplatzer closed 8 years ago
No falta un "\n" debajo de https://github.com/codenautas/js-from-html/blob/master/test/fixtures/pseudo-pp.js#L15? Donde dice:
html.pre(
"\n"+
"Array.prototype.forEach.call(document.body.childNodes, function(node){\n"+
" console.log(JSON.stringify(node.textContent));\n"+
"});\n"
),
No debería decir?
html.pre(
"\n"+
"Array.prototype.forEach.call(document.body.childNodes, function(node){\n"+
" console.log(JSON.stringify(node.textContent));\n"+
"});\n"+
"\n"
),
Puede ser. Hay que mirar cómo queda el textContent metiendo el html de la entrada
On Tue, Apr 19, 2016 at 2:00 PM, Diego Florio notifications@github.com wrote:
No falta un "\n" debajo de https://github.com/codenautas/js-from-html/blob/master/test/fixtures/pseudo-pp.js#L15 ? Donde dice:
html.pre( "\n"+ "Array.prototype.forEach.call(document.body.childNodes, function(node){\n"+ " console.log(JSON.stringify(node.textContent));\n"+ "});\n" ),
No debería decir?
html.pre( "\n"+ "Array.prototype.forEach.call(document.body.childNodes, function(node){\n"+ " console.log(JSON.stringify(node.textContent));\n"+ "});\n"+ "\n" ),
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/codenautas/js-from-html/issues/6#issuecomment-212016234
No te entiendo
Opino que conviene hacer lo que haga el navegador. Pruebo con Chrome y utilizo el inspector y la consola obteniendo:
cuando miro veo que el último "\n" no está, veo uno solo.
Por ejemplo:
Debe quedar como
Lo mismo si hay mix de contenido:
queda