asciidoctor / brackets-asciidoc-preview

Live Preview of AsciiDoc for Adobe Brackets
MIT License
50 stars 16 forks source link

Upgrade to Asciidoctor 1.5.5-4 #37

Closed ggrossetie closed 7 years ago

ggrossetie commented 7 years ago

Some pending issues:

nerk commented 7 years ago

Thank you very much! I tried your changes but it produces

Error: Unable to automatically detect the JavaScript platform, please configure Asciidoctor.js: `Asciidoctor({runtime: {platform: 'node'}})`

I wrote a tiny test which will probably make it easier for you to reproduce this. Just put the files attached + the asciidoctor.js files into the same directoy.

Change test.txt to test.html and worker.txt to worker.js, Fire up a local webserver and load 'test.html' in your browser.

That should reproduce the same error message in the browser's debugging console.

worker.txt test.txt

nerk commented 7 years ago

@Mogztter I just noticed that you already discovered the same problem.

nerk commented 7 years ago

BTW, Asciidoctor should use XMLHttpRequest to include files within Brackets. The rendering code does not have direct access to the filesystem.

ggrossetie commented 7 years ago

Thank you very much! I tried your changes but it produces Error: Unable to automatically detect the JavaScript platform, please configure Asciidoctor.js: Asciidoctor({runtime: {platform: 'node'}})

I just noticed that you already discovered the same problem.

Yes there's a bug in Asciidoctor.js, I will release a 1.5.5-5 to resolve this issue. Once this is fixed, you should be able to configure Asciidoctor.js:

Asciidoctor({runtime: {platform: 'browser'}})

BTW, Asciidoctor should use XMLHttpRequest to include files within Brackets. The rendering code does not have direct access to the filesystem.

Ok.