On 1 October 2011 13:47, recryn <[email protected]> wrote:
> Hi, I have this minimal asciidoc.conf:
>
> ----8<----
> [macros]
> (?su)(?P<name>longtxt):(?P<target>[^:]+):=
> (?su)(?P<name>strong|em):(?P<target>[^:]+):=
>
> # for DocBook
> ifdef::backend-docbook[]
> [strong-inlinemacro]
> <emphasis role="strong">{target}</emphasis>
> [em-inlinemacro]
> <emphasis>{target}</emphasis>
> endif::backend-docbook[]
>
> # for HTML
> ifdef::backend-xhtml11[]
> [strong-inlinemacro]
> <{name}>{target}</{name}>
> [em-inlinemacro]
> <{name}>{target}</{name}>
> endif::backend-xhtml11[]
>
> [longtxt-inlinemacro]
> # this does not work: **The quick brown fox** jumps over __{target}__
> strong:The quick brown fox: jumps over em:{target}:
> ----8<----
>
> The longtext macro is invoked like this: longtxt:the lazy dog:
>
> Since markup does not work inside the macros I wonder if it is
> possible to access the standard tags without defining the extra
> definitions strong:: and em::?
>

Hi,

Markup template sections are intended for defining output markup, they
are not scanned for input markup so that most text can be used
unescaped.  So very little markup is recognised and cannot be extended
without risking backward compatibility with existing configuration
files.

The only things that are guaranteed to work are defined here
http://www.methods.co.nz/asciidoc/userguide.html#_markup_template_sections

That does not include user macros, so the fact that your defined
macros actually work might actually be considered a bug, since some
constructs might need escaping in the output text but that fact isn't
documented.

Cheers
Lex

> cheers,
> recryn
>
> --
> You received this message because you are subscribed to the Google Groups 
> "asciidoc" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/asciidoc?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to