From e298692eeeffbe143fdda771e01145996a488ce5 Mon Sep 17 00:00:00 2001 From: Jason Chen Date: Thu, 20 Sep 2018 17:17:20 -0700 Subject: [PATCH] better code block to html conversion also fixes firefox including turning into \n - if (text.startsWith('\n')) { - text = text.slice(1); - } - text = text.slice(index, index + length); + const text = this.children + .map(child => child.domNode.innerText) + .join('\n') + .slice(index, index + length); return `
${escapeText(text)}
`; } }