Edit Section

Keyword markup

This proposal try to:

The basic idea is [[]] make link, {{}} include extensions. Everything but links is implemented with extensions and can be replaced with farm or wiki plugins.

This proposal try to use key:value pairs when possible. We already use this for ACL:

#acl user:read,write All:

and search:

[[FullSearch(linkto:PageName title:Help)]]

And we many want to use this for meta data:

Author: Name
Status: Draft
...

Rules:

Markup

Display

Comments

[[PageName]]

PageName

[[Page Name]]

Page Name

[[PageName title:Title]]

Title

[[Page Name title:Title]]

Title

[[Page Name image:moinmoin.png]]

moinmoin.png (links to "Page Name")

Its not hard to parse but smell

[[Page Name title:Title image:moinmoin.png]]

moinmoin.png
Title

[[http://example.com]]

http://example.com

same for all other schemas

[[http://example.com title:Example]]

Example

same for all other schemas

[[moinmoin.png]]

moinmoin.png

link to an attachment, will open the image in a window. Assume that attachments are pages.

[[moinmoin.png title:1000 words]]

1000 words

same with custom title

[[http://example.com/moinmoin.png]]

http://example.com/moinmoin.png

link to external image - does not include the image!

[[http://example.com/moinmoin.png title:Funny Man]]

Funny Man

link to external image with title

[[wiki:MoinMaster/RemotePageName]]

RemotePageName

interwiki link

[[wiki:MoinMaster/RemotePageName title:page from Master]]

page from Master

interwiki link

Backward compatibility:

Markup

Display

Comments

PageName

PageName

works unless turned off in config

http://example.com

http://example.com

same for all other schemas

Additions:

Markup

Display

Comments

[[Page Name class:value]]

Page Name (use css class)

add the css class of the link <a class="original-class value">

[[Page Name accesskey:value]]

Page Name (use accesskey)

Set accesskey for the link <a accesskey="value">

Problems:

Include

Rules:

Markup

Display

Comments

text {{BR}} text

text
text

include <br>

{{PageCount}}

15698

simple macro

{{page:Page Name from:"^= heading 1 =$" to:"^= heading 2 =$"}}

(include parts from "Page Name")

macro with arguments

{{page:Page Name}}

(include the contents of "Page Name")

include a page

{{image:Image Name}}

(include "Image Name")

or an image

{{media:Media.mpeg}}

(include "Media.mpeg")

include time based media

{{http://example.com/moinmoin.png}}

moinmoin.png

or an external image

{{http://example.com/}}

(include the html from example.com/)

<!> unsafe, unless we sanitize the html

{{image:Image Name class:cssclass title:Simple Figure}}

(Figure section)

a simpler way to do figures {{{#!figure\n#class cssclass\n}}}

Parsers extenstions:

Empty extension default to plain plugin:
{{
plain text as is
}}

Python code:
{{python
import sys, os
print 'hello!'
}}

New SectionParser:
{{section:cssclass format:rst
RST markup here...
}}

or:
{{section class:cssclass format:rst
RST markup here...
}}
?

{{figure
some markup
 <!> we must have nesting if we want to include here!
}}

Backward compatibility:

Markup

Display

Comments

attachment:file.txt

file.txt

inline:file.txt

   1 I'm a file.
file.txt

drawing:drawing.png

drawing.png

http://moinmoin.wikiwikiweb.de/wiki/classic/img/moinmoin.png

http://moinmoin.wikiwikiweb.de/wiki/classic/img/moinmoin.png

Maybe we should use the same words: inline, attachment and drawing instead of page and image?

Discussion

IMHO key:value pairs should only be used when nessesary. One advantage of a wiki markup language is that the user has to type less when he uses it instead of html. With a wiki markup similar to html you loose that advantage.

I like
{{Image(sunrise.jpg,right,nofloat,thumb,"A sunrise")}}
more than
{{Image:sunrise.jpg alignment:right float:nofloat size:thumb caption:"a sunrise"}}.
I also think that a syntax without key:value pairs is easier to learn for a new user.

WikkaWiki uses a syntax similar to html ({{image class="center" alt="DVD logo" title="An Image Link" url="images/dvdvideo.gif" link="RecentChanges"}}) and one of the reasons I chose MoinMoin was because I liked the MoinMoin markup more than the WikkaWiki markup.

Because of these reasons, I prefer the proposed PositionalMarkup to the proposed KeywordMarkup.

I don't think it will work - arguments without any specific order that are magically bound to the correct variable?

What if I have some arbitary strings like:

Either order matter, or you need keys. keys are easier to read.

MoinMoin: KeywordMarkup (last edited 2007-10-29 19:21:23 by localhost)