Saturday, March 11

standard wiki markup

Alan asked the other night what I thought a core set of wiki markup/syntax conventions would be. I've attached the bulk of the mail I wrote, on the off chance anyone's interested.

I think there's probably never going to be a really standard wiki syntax, unless you count things like Textile, which a lot of people seem to like, or MediaWiki's syntax, which probably sees the most use, given the sheer size of Wikipedia. This doesn't actually bother me too much as long as people keep designing with a couple of ideas in mind - transparency and low barriers to entry, more or less.

It might be cool to see a straightforward standard ("here is my set of regular expressions") for transporting wiki text. Wonder if anyone's working on this.

+

Date: Wed, 8 Mar 2006 23:14:02 -0800
From: User Bbearnes
Subject: Re: wiki markup
To: Alan Grow

All right, so I've got a multipart answer.

Part one is is I think the core wiki markup is a slighly modified version
of the original c2/usemod standard:

CamelCase and/or [[page to link to]]
[http://what.the.fuck.ever linktext]

---- -> horizontal rule

 initial space -> preformatted/monospace text

* -> bulleted list item
# -> numbered list item

= header 1 =
== header 2 ==
=== header 3 ===
etc.

:blockquote
::more indented/nested blockquote

-- -> &mdash, in some systems.

In general stuff follows plaintext e-mail "styles", with a notable
exception:

''<i>talics or <em>phasized''
'''<b>old or <strong>'''

Which is actually fucking stupid; it should clearly be *strong* and
_emphasized_.  I've been using a wiki at work that does this, since it's
part of Textile, which is one of its default available languages.

Which brings me to my second part - you could just use Textile, which does
some cool stuff.  I don't know that there's a library out there to
interpret it, but as far as I know it originates with a free licensed
blogging package called TextPattern, so there ought to be one.  Textile is
cool up to a point - for 90% of the markup you will ever do - then it
starts grating on my sensibilities.

Third part:  I know portability is always a concern, but I think it's
actually far less of one with decent wiki markup, since it's pretty much
the closest thing you're going to get with any real features to
human-readable plaintext.  It would be trivial to parse your wikitext out
into any necessary intermediary if you decided to migrate later - a lot
more trivial than it will be for the 6 years worth of HTML and embedded
Perl I've got sitting in a pile here.