Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi,
The asciidoc.js project mentions that Opal.hash2 must be used to pass options,attributes to asciidoctor.js If I try to do that var asciidocOpts = Opal.hash2(['options'], {'options': ['doctype', 'book']}); Screenshot_2014-03-18_18.02.47.png The result generated does not display the title of the book + author name and version. Is it an issue with my syntax or a bug with asciidoctor.js ? See screenshot Regards,
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist Twitter : @cmoulliard |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
As things currently stand today, you're probably sending strings when on the ruby side it's expecting symbols. I recall Dan and Alex having a discussion about that. If it's a symbol in ruby use ':attribute-name' instead of just 'attribute-name', same goes for values. Give that a try.
On Tue, Mar 18, 2014 at 11:05 AM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote: Hi, ... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Does not work if I use also the symbol var asciidocOpts = Opal.hash2(['options'], {'options': [':doctype', 'book']}); On Tue, Mar 18, 2014 at 7:47 PM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
... [show rest of quote] Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist Twitter : @cmoulliard |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Yes we are discussing about symbols for languages which don't have symbols. We need to make some research because does the users of Asciidoctor from none Ruby world should take care that there are something called symbols in Ruby? Or we should provide some kind of wrappers?
Well this is where we are now. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
In reply to this post by ch007m
In Opal, strings are just symbols and vice verse. There is no distinction. On Wed, Mar 19, 2014 at 2:17 AM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
You should put the options inside an options key. It's already a hash of options, so you just use the names directly. In other words, you'd write: [source,js] ---- var asciidocOpts = Opal.hash2(['doctype'], {'doctype': 'book'}); ---- For more examples, see the source of the Chrome extension (or anything based on Asciidoctor.js). -Dan |
Free forum by Nabble | Edit this page |