[Pmwiki-users] new link markup format? [[link] text]

Wayne Lee wl.pmwiki
Sat May 8 14:39:38 CDT 2004


On May 8, 2004, at 11:29 AM, Patrick R. Michaud wrote:

> On Sat, May 08, 2004 at 10:16:11AM -0700, Wayne Lee wrote:
>> It might be too late in the game here,
>> but I'd like to suggest an alternative
>> markup for links.  I stumbled upon this
>> idea while researching wiki markups:
>>
>> [[LinkName] alternative text]
>
> I like it a *lot*, but it really conflicts with PmWiki's existing
> markup and pages.  Consider [[spacewikiwords]], [[nogroupheader]],
> [[nogroupfooter]], as well as [[WikiWord link]].

Yes, It would not be backwards compatible.
Some things would have to change, but
I think it is very do-able.

By prohibiting SpecialMarkup tag names
as Wiki page names and by not allowing
the [[WikiWord link]] markup, I've been
able to get most of the functionality working
using DoubleBrackets alone.  Again, PmWiki's
extensibility is *excellent*!  I'll post that after
the wrinkles are ironed out.

> So, alas, it may indeed be "too late in the game".  But I am very
> interested in adopting a markup along these lines--especially if it
> ever becomes a part of a unified standard for wiki links.  (Side
> question: is Wikipedia or other wikis considering/using anything
> like this?)

Did some more research.

Some folks are attempting to standardize on a Wiki
Markup, but nothing official.  Might be awhile before
anything real happens.

<http://www.usemod.com/cgi-bin/mb.pl?WikiMarkupStandard>

I looked at a couple other Wikis (UseMod, TWiki,
PhpWiki, WikkiTikkiTavi, and MediaWiki).  None
use this method for free links and alternative text.
Those other engines use these:

[[link | alternative text]]
((link | alternative text))
[alternative text | link]

BTW, this is where I first learned about this syntax:

<http://c2.com/cgi/wiki?CamelVsNonCamel>

> We *can* create this markup with curly braces instead of
> square brackets and not result in hardly any conflicts to PmWiki's 
> existing
> markup.  I just fear that getting the installed PmWiki base to switch
> the link syntax may be too much to swallow.  (However, if such a
> change were to occur, we'd certainly provide tools to automatically
> convert existing pages to the new markups.)

I'd vote against mixing brackets with curly
braces.  Stick to one.  Keep it simple.

Also, I had a couple of typos, so I'll post
the markups below again.

Thanks,
Wayne

----

Markup (input)                   Link Text (output)
--------------                   ------------------

Normal WikiLink (links to WikiPage)

WikiPage                         => WikiPage
[[WikiPage]]                     => WikiPage
[[WikiPage] link to wiki]        => link to wiki
[[WikiPage] ]                    => [1]
[[wiki page]]                    => wiki page
[[wiki page]]s                   => wiki pages

Free Link (links to Wiki)

[[Wiki]]                         => Wiki
[[Wiki] link to wiki]            => link to wiki
[[Wiki] ]                        => [1]
[[wiki]]                         => wiki
[[wiki]]s                        => wikis

URL Link (links to http://google.com)

http://google.com                => http://google.com
[[http://google.com]]            => google.com
[[http://google.com] google]     => google
[[http://google.com] ]           => [1]

Attach LInk (links to file called file.txt)

Attach:file.txt                  => Attach:file.txt
[[Attach:file.txt]]              => file.txt
[[Attach:file.txt] file]         => file
[[Attach:file.txt] ]             => [1]

Attach Link with space (links to file called 'my file.txt')

[[Attach:my file.txt]]           => my file.txt
[[Attach:my file.txt] my file]   => my file
[[Attach:my file.txt] ]          => [1]




More information about the pmwiki-users mailing list