Yes, that is indeed close enough (although I don't like that unnecessary
span tag).
What I could do some minutes ago was to define :spc:   and
[regex-inlinemacro]
<code class='regex'>{passtext}</code>
Then, in the asciidoc file I write
some text [.regex]`{spc}{spc}this ` more text
and it translates to
<code class='regex'> this </code> more text
Note that I have to use [.regex]. Simply [regex] does not work. Also,
simply using   instead
of {spc} works, but using the {nbsp} doesn't work (no spaces are kept).
On Thursday, February 5, 2015 at 9:13:54 PM UTC-2, Lex Trotman wrote:
>
> On 6 February 2015 at 09:20, Fernando Basso <[email protected]
> <javascript:>> wrote:
> > I swear to god I'm reading the user guide a lot. Still, I cannot figure
> out
> > how to write a macro or create customize asciidoc for my need.
> >
> > I also found this example:
> >
> > http://mojavelinux.github.io/decks/asciidoc-with-pleasure/#42.0
> >
> > In that example, are the two pieces of code?
> >
> > What if I want to write something that allows me to write this in an
> > asciidoc file:
> >
> > some text [.regex]` foo bar ` more text...
>
> Well
>
> some text [regex]++ foo bar ++ more text
>
> produces
>
> some text <code><span class="regex"> foo bar </span></code> more text
>
> Is that close enough?
>
> Cheers
> Lex
>
>
> >
> > And make it translate to
> >
> > <code class='regex'>[space]foo bar[space][space]</code>
> >
> >
> > I don't know. The docs seem to lack examples. But I feel it is my fault
> > nonetheless because other
> > people have learned to do wonderful things with it anyway.
> >
> > Thanks in advance for any help or insights.
> >
> > --
> > 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] <javascript:>.
> > To post to this group, send email to [email protected]
> <javascript:>.
> > 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.