On 03/02/2011 06:48 AM, Michael Wild wrote:
>
>
> On Mar 1, 10:06 pm, Lex Trotman <[email protected]> wrote:
>> On 2 March 2011 07:17, Michael Wild <[email protected]> wrote:
>>
>>> On Mar 1, 10:20 am, Lex Trotman <[email protected]> wrote: [snip]
>>
>>>> In that case you should provide your echo macro and its python
>>>> to make it easier to see whats wrong.
>>
>>>> Cheers Lex
>>
>>> That's why I attached a test case to my first message...
>>
>> Sorry missed that, my only excuse is I currently have a cold so
>> the old brain isn't working too well.
>>
>> The following asciidoc.conf works for me [macros]
>> (?su)[\\]?(?P<name>echo):(?P<subslist>\S*?)\[(?P<fred>.*?)(?<!\\)\]=[]
>>
>>
>>
[echo-inlinemacro]
>> DEBUG: passtext = '{fred}' {sys:/usr/bin/python ./filter.py
>> '{fred}'}
>>
>> Its better to treat passtext and so on as reserved words and use
>> your own attribute names because the predefined ones may have
>> special processing as you found.
>>
>> Cheers Lex
>>
>
> Oh, bugger. I was _sure_ I had already tried that (not "fred", of
> course ;-)), but obviously I haven't... Now I'll have to revert my
> whole preprocessing hack *sigh*.
>
> Thanks for your help
>
> Michael
>
Mmmh, the next problem has surfaced. If I have a } character in the
macro argument, the {sys:} attribute aborts processing there, instead of
where it should. E.g. the call
echo:[OOOPS, } curly braces are evil]
results in an error, because an incomplete string is passed to the
filter porgram. I tried escaping the curly brace with up to three
backslashes, but no luck...
Any idea?
Michael
--
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.