Hey Axel & Stuart,
Another way is to enable the attributes subs on the listing block.
By default, a listing block has the subs specialcharacters and callouts.
You can modify this set as follows:
[source,javascript]
[subs="specialcharacters,attributes,callouts"]
----
... = '{cow}';
----
Another option is to enable macros and use a pass:[] macro to allow the
char reference to go through untouched. However, I've observed conflicts
between escaped placeholders and syntax highlighting.
If inserting the Unicode character directly fits your requirements, that's
definitely the simplest option.
I hope those options help get you closer.
Cheers,
-Dan
On Nov 5, 2013 3:12 PM, "Stuart Rackham" <[email protected]> wrote:
> Hi Axel
>
> On 11/10/13 04:42, Axel Rauschmayer wrote:
> > Iād like to use the Unicode character š inside normal text and inside a
> > listing block. Directly referring to the character did not work, but the
> > following got me quite close:
> >
> > :cow: 🐄
> >
> > This is a cow: {cow}
> >
> > [source,javascript]
> > ----
> > var str = '{cow}';
> > ----
> >
> > Any tips for how to best make the cow appear inside the listing block?
>
> It will not work because the source-highlight filter escapes special
> characters, so 🐄 is translated to &#x1F404;
>
> One way round this might be to paste the Unicode character directly into
> the source text.
>
> Cheers, Stuart
>
> >
> > --
> > 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/groups/opt_out.
>
> --
> 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/groups/opt_out.
>
--
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/groups/opt_out.