DEV Community

Discussion on: How to display/output as template string?

Collapse
 
merri profile image
Vesa Piittinen • Edited

The poor man's solution... open Codepen and throw these codes:

<textarea rows="40" cols="120" style="font-family:monospace"></textarea>

.

document.getElementsByTagName('textarea')[0].textContent = eval(
    // copy-and-paste the above type of string here
)

Could automate more. Also noticed that apparently my setup for tap-nirvana isn't probably working right as I'm getting deepEqual comparisons in a very unfriendly syntax and the whole purpose for tap-nirvana is to give me pretty colors and diffs.

Collapse
 
merri profile image
Vesa Piittinen

Replaced tap-nirvana with tap-difflet and no more issues with double escaped strings and diffs are easier to read :)