Closed ggrossetie closed 5 years ago
Yep, that's what I'm currently trying to do (based on your PR for 1.5.4). Basically, rendering is working, include:: also works.
However, the worker thread still produces
TypeError: Object # has no method 'get'
TypeError: Object # has no method 'get'
in my preview window console.
Debugging is a bit tricky because of the WebWorker thread and Chrome gives me a bad time setting breakpoints - for whatever reasons. Maybe a problem under Linux, might try this on a Windows machine.
I did not try extensions yet, must be converted using the new API.
Unfortunately, I am pretty busy with other things...
I did not try extensions yet, must be converted using the new API.
Yes the way to go is to write extensions in JavaScript using the new API.
However, the worker thread still produces
Sorry this error doesn't sound familiar...
Unfortunately, I am pretty busy with other things...
No worries 😉
1.5.6-preview.3 seems to work for me, but I need some help creating an image block from my diagram extension. I am trying
return self.createBlock(parent, 'image', Opal.nil, {
"target": requestUrl,
"title": title
});
which creates the following error message
include?: undefined method `include?' for nil
I think this has something to do with passing Opal.nil as the third parameter to createBlock(). Can you tell me how to create an image block with the extension API, without having an actual 'source' parameter?
Creating other types of blocks is working fine.
To be honest, I've never tried to create an image block in an extension.
Could you try to use the method $create_image_block
? https://github.com/asciidoctor/asciidoctor/blob/master/lib/asciidoctor/extensions.rb#L150
I think this has something to do with passing Opal.nil as the third parameter to createBlock()
Maybe... but you should not use Opal.nil
with the new API. We are trying to hide this implementation detail.
I think I will add a new function createImageBlock
in the API and release a preview.4.
It's because you have not specified the alt attribute. The alt attribute is required when creating an image node (though we could be nicer about how we enforce it ;))
@mojavelinux Bingo! Must have changed in newer versions of Asciidoctor.
Do you want to add this check in the Ruby API ? In the meantime I can add this check in the JavaScript API on the future createImageBlock() function.
Le 1 août 2017 2:28 PM, "Thomas Kern" notifications@github.com a écrit :
@mojavelinux https://github.com/mojavelinux Bingo! Must have changed in newer versions of Asciidoctor.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/asciidoctor/brackets-asciidoc-preview/issues/40#issuecomment-319355787, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUV3G1lcHkJ6dv6fUSfDJsLH_nyotZTks5sTxnugaJpZM4Onskd .
@nerk yes, this was a change in Asciidoctor 1.5.6. We moved when the default alt text was defined so we could apply the substitutions correctly.
I do think this should be checked in the create_image_block method. In fact, it should check for target too, which is also required. Let's pursue that change in core.
Hi,
I read the documentation http://asciidoctor.org/docs/user-manual/#customizing-the-cross-reference-text but still can not manage to have the link displayed as Chapter 1 or Section 1.1 instead of France or Paris (in my example). This is possible since issue 858 has been fixed : https://github.com/asciidoctor/asciidoctor/issues/858.
:xrefstyle: full
= Hello
== France
=== Paris
xref:France[]
<<France>>
<<Paris>>
Unfortunately this is rendered as
I know I am missing something but what ?
Thank you for your help.
Charlotte
I assume you are seeing this in the 1.5.6 branch of the plugin?
I downloaded the branch version but I have a white screen when launching the preview.
I did not merge the branch yet, because I wanted to wait for Asciidoctor.js 1.5.6 final. Could you please hit F12 in Brackets and check for errors in the console?
Make sure you do not have any custom extensions in AppData/Roaming/Brackets/extensions/data.nerk.asciidoc-preview or .config/Brackets/extensions/data.nerk.asciidoc-preview.
Existing extensions are not compatible with Asciidoctor.js 1.5.6 - another reason why I did not merge yet.
I just tried your example with the 1.5.6 plugin and it's working for me.
Seems something is wrong with your installation. Did you actually build a zip file (npm install, grunt dist) and installed the zipfile using the Brackets extension manager?
Try the following:
This is working now ! Many thanks.
Thanks, display is working but include::filename.adoc[] does not work anymore.
@charlottedeclercq Include:: works for me. Could you post some AsciiDoc to reproduce the problem?
@charlottedeclercq Which version of Brackets are you using? Mine is 1.10
I installed version 1.11 right now, I was using 1.8. I still can not see the content called by include :
Ok I found the problem, installing the new version changed teh safe mode to Secure. I put it back to Server and it is working fine again.
:+1:
Asciidoctor.js 1.5.9 is out! https://github.com/asciidoctor/asciidoctor.js/releases/tag/v1.5.9 @nerk If you are still working on this project I can help you with the update 😉
@Mogztter Great news, thanks. I'm definitely planning to do an update, hopefully during the next days. I've been too busy with a lot of other stuff, unfortunately. I'll let you know in case I need help.
Alright :+1:
Version 2.0.0 uses Asciidoctor.js 1.5.9.
Awesome, thanks for the upgrade @nerk!
Could you please try to upgrade to https://github.com/asciidoctor/asciidoctor.js/releases/tag/v1.5.6-preview.3 ? This is hopefully the latest release version before 1.5.6 final. Please let me know if you find any issue.
Thanks 😊