On 20 January 2015 at 22:02, Fernando Basso <[email protected]> wrote:
> I need to do something like this:
>
>     [role='exercise']
>     --
The above is the start of the first block
>     [role='question']
>     --
The above is the end of the first block
>     question goes here.
>     --
The above is the start of the second block
>
>     [role='answer']
>     --
The above is the end of the second block
>     answer goes here.
>     --
The above is the start of the third block
>     --
The above is the end of the third block

There is no nesting of blocks of the same type possible because the
block open syntax is the same as the block close syntax.

You will have to use different block types or other constructs if you
want to nest.

The closest way to get your result is probably

[role='ex']
--
introductory blah blah
--
[role='q']
--
tough question
--
[role='a']
--
expansive answer

using several paras
--
[role='ex']
--
continued blah blah
--

etc

and use the css to style 'q' and 'a' the same as 'ex' except for what
you wanted different.

The difference is only one extra [role='ex'] per exercise.

Cheers
Lex

>
>     I wanted the output to be something like
>
>     <div class='exercise'>
>         <div class='question'>Question goes here.</div>
>         <div class='answer'>Answer goes here.</div>
>     </div>
>
> Is something like that possible (I'm only concerned with html5 backend)?
>
> --
> You received this message because you are subscribed to the Google Groups
> "asciidoc" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/asciidoc.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/d/optout.

Reply via email to