On Sunday, January 18, 2015 at 1:33:45 PM UTC-8, Lex Trotman wrote:
>
> On 19 January 2015 at 06:11, Ewan Edwards <[email protected] <javascript:>>
> wrote:
> >
> > In AsciiDoc, I've tried this:
> >
> > [source,php,subs="macros"]
> > ----
> > <?php
> > return array(
> > "xref:widget[widget]" => array(
> > "foo" => 1,
> > "bar" => "string",
> > ),
> > );
> > ----
> >
> > which loses everything before "widget".
>
> What docbook xml do you get from asciidoc?
>
Great question; it hadn't occurred to me to check that. When I don't escape
the question mark, I get:
<programlisting language="php" linenumbering="unnumbered"><?php
return array(
"<link linkend="widget">widget</link>" => array(
"foo" => 1,
"bar" => "string",
),
);</programlisting>
Which makes the problem obvious: everything between '<?php' and the opening
<link> tag is being interpreted as an XML tag.
The block renders correctly if I change the block configuration to:
[source,php,subs="specialchars,macros"]
Thanks very much for the hint, Lex!
--
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.