On 3 July 2011 14:52, yangzhe1990 <[email protected]> wrote:
> Thanks. I have another question about the parser.
>
> Why can pass:[] macro in "blahblah{empty}pass:[]" be recognized while
> link: macro in "blahblah{empty}link:<path>[]" can't? (after conversion
> to html it becomes blahblahlink:<path>[]")

Passthroughs are detected before attribute substitution (since
substitution may not happen on their contents) and so the "pass" is
separated from other alphabetics by '}' making it detectable.

Other macros are detected after attribute substitution since
substitution has to happen on their contents.  So the "{empty}" is
replaced by nothing and as your output shows "link" becomes part of
another word and so doesn't get detected.

This has to be the case otherwise any word ending in "link:" could be
taken as a macro, eg don't blink:

>
> And could you (or could I) define an escape which expands to null
> string so that I can type "blahblah\@link:<path>[]" where "\@" stand
> for  null char.

No it will still make "link" part of the previous word and it won't be detected.

Cheers
Lex

-- 
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