Conditional - documentation needed

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

Conditional - documentation needed

wolandscat
It took me a while to find out how to use ifeval syntax properly - the expression embedded appears to be python, but it's not obviously stated in most places.

Could I suggest that ifdef and ifeval, including what can come inside the [] of ifeval, is documented properly in the main Asciidoctor user manual? This would be a great help. I'm sure various people (including myself) would be prepared to build a first draft of content if it's needed.

Also:

any reason there is no 'else'?
Reply | Threaded
Open this post in threaded view
|

Re: Conditional - documentation needed

mojavelinux
Administrator
Thomas,

I agree. This feature needs to be documented. Somehow, it go overlooked on the initial go to draft the Asciidoctor User Manual. It's currently an open issue:


> the expression embedded appears to be python

The expression is very standard/universal conditional logic, which looks a bit like Python, but is actually a custom evaluator. See https://github.com/asciidoctor/asciidoctor/blob/master/lib/asciidoctor/reader.rb#L759-L767.

> any reason there is no 'else'? 


It wasn't implemented in AsciiDoc Python, so we need to design how it will work, then implement it.

Cheers,

-Dan

On Mon, Dec 14, 2015 at 4:41 AM, wolandscat [via Asciidoctor :: Discussion] <[hidden email]> wrote:
It took me a while to find out how to use ifeval syntax properly - the expression embedded appears to be python, but it's not obviously stated in most places.

Could I suggest that ifdef and ifeval, including what can come inside the [] of ifeval, is documented properly in the main Asciidoctor user manual? This would be a great help. I'm sure various people (including myself) would be prepared to build a first draft of content if it's needed.

Also:

any reason there is no 'else'?


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Conditional-documentation-needed-tp4089.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen
Reply | Threaded
Open this post in threaded view
|

Re: Conditional - documentation needed

jaredmorgs
I'm doing a docs PR for this at the moment. Dan's reviewed it so I'll incorporate the changes tonight and it should be ready to go.