[Pmwiki-users] Re: null characters or pattern breaking characters

Christian Ridderström chr
Wed Jan 14 06:51:20 CST 2004


On 13 Jan 2004, John Rankin wrote:

> Sometimes smart quotes will produce one without your having to ask, eg
> 
>    3-5
> 
> automatically becomes
> 
>    3–5

Neat!

Christian wrote:
>> So... to summarize, I think the token should:
>>  * Be used to prevent pattern matches
>>  * Not produce anything in the HTML output
>>  * Not 'block' future use of other tokens, e.g. ⁣
>> 
>> But inspired from John's suggestion, how about using '`.` as markup for 
>> the token though? The idea would be that it 'reminds' us of the 'STOP' in 
>> telegrams...
>> 
>> ===

John wrote:
> Christian, this also perhaps offers a better way to solve the : problem
> in [[toc:]] markup.

So you're basically suggesting that we introduce the markup '`.' to 
indicate a virtual stop, that will be interpreted in different ways.
> 
> Alternative: A possibly better approach would be to act only on 
> instruction from the author. Thus (using `. as a stop):
> 
>    :#Term`.:And its definition follows
> 
>    :#Another:With another definition
> 
> would produce the following table of contents:
> 
>    Term
>    Another:With another definition

I see, the author explicitly controls what appears in the toc.

> This allows an author to truncate the table of contents entry for long
> headings:
> 
>    !!!#A long heading`., of which only part displays

Elegant!

> It also opens options for making T:WikiWord markup smarter. Inserting a
> `. into the first paragraph of WikiWord would cause the script to return 
> text up to that point.

And similarly, if we in the page 'RefPage' have:

      This page is an example\. Bla bla bla bla bla

and this markup:

	T*RefPage		

would produce:

	RefPage: This page is an example…

> I like the idea of `. meaning stop, and of course . is a full stop :-)

"full stop"?

Anyway, to conclude, I think this use of `. is very nice and we should 
go for it, but I'm not sure if this means we no longer need a null token.

/Christian


-- 
Dr. Christian Ridderstr?m, +46-8-768 39 44       http://www.md.kth.se/~chr




More information about the pmwiki-users mailing list