bukalapak/snowboard

Console error: Uncaught SyntaxError: Unexpected end of input

ls-dac-chartrand opened this issue · 1 comments

When I try to use Snowboard 3.7.5 to generate an html page it doesn't work. Chrome complains about Uncaught SyntaxError: Unexpected end of input.

Can't use Snowboard 4.x+ because it doesn't has the ability to generate a single webpage.

Steps to reproduce

On MacOS 10.15.4

Download: https://github.com/apiaryio/api-blueprint/blob/master/examples/01.%20Simplest%20API.md

yarn add global snowboard@3.7.5
snowboard html -o test.html 01.\ Simplest\ API.md.txt
open test.html

Expected: Webpage

Actual: Console error: Uncaught SyntaxError: Unexpected end of input

Screen Shot 2020-05-25 at 10 03 43 AM

Workaround

I think the. problem comes from here: https://github.com/sveltejs/svelte/pull/2989/files#diff-88efceaaf9db61e49b0b84e7a104679bR276

I can fix by opening test.html and changing:

iframe.src = `data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>`;

To

iframe.src = "data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>"