display of icons fails when converting with ruby module

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

display of icons fails when converting with ruby module

Mark
Hello
I am a beginner in asciidoc and just tried two ways running asciidoctor ,
as command prompt and with ruby.

First I tried:
>
> cat -e minimal.adoc
= test$
:icons: $
:iconsdir: /usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc/images/icons $
$
IMPORTANT: foo~              
>
>asciidoctor minimal.adoc
>

I get the expected result, the Icon 'important.png' is rendered korrectly.
However, when I try the same with ruby,
'IMPORTANT: foo' renders as 'Important foo ':
>
> cat -e convert.rb
require 'asciidoctor'$
require 'asciidoctor/extensions'$
$
Asciidoctor.convert_file 'minimal.adoc'~                                                                                                                        
>
> ruby convert.rb
>

I wonder whether this is hints to a corrupt installation  or whether I got something fundamentally wrong.

Thank you

Mark
 
Reply | Threaded
Open this post in threaded view
|

Re: display of icons fails when converting with ruby module

mojavelinux
Administrator
You need to set the safe mode when using the API.


-Dan

On Wed, Nov 15, 2017 at 6:40 AM, Mark [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello
I am a beginner in asciidoc and just tried two ways running asciidoctor ,
as command prompt and with ruby.

First I tried:
>
> cat -e minimal.adoc
= test$
:icons: $
:iconsdir: /usr/local/Cellar/asciidoc/8.6.9/etc/asciidoc/images/icons $
$
IMPORTANT: foo~              
>
>asciidoctor minimal.adoc
>

I get the expected result, the Icon 'important.png' is rendered korrectly.
However, when I try the same with ruby,
'IMPORTANT: foo' renders as 'Important foo ':
>
> cat -e convert.rb
require 'asciidoctor'$
require 'asciidoctor/extensions'$
$
Asciidoctor.convert_file 'minimal.adoc'~                                                                                                                        
>
> ruby convert.rb
>

I wonder whether this is hints to a corrupt installation  or whether I got something fundamentally wrong.

Thank you

Mark
 


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/display-of-icons-fails-when-converting-with-ruby-module-tp6021.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: display of icons fails when converting with ruby module

Mark
Thank you!
now everything works

Mark

> On 19 Nov 2017, at 07:10, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
>
> You need to set the safe mode when using the API.
>
> See http://asciidoctor.org/docs/user-manual/#running-asciidoctor-securely
>
> -Dan
>