Duck syntax

Frederic Peters <fpeters at 0d.be>
Thu Dec 4 12:14:29 EST 2014

Hi Shaun,

Shaun McCance wrote:
> Some of you know I've toyed around with a non-XML syntax for Mallard.
> I'm going to start tossing out what's been in my head in the hopes that
> others can follow along.

It's been some time but I have finally got the opportunity to present
this at work, the public was two person with familiarity to wiki
syntaxes and some knowledge of mallard (they wrote pages, mostly by
copying and filling templates).

The most important thing will be to get duck support into yelp, for
now I explained how to use the ducktype converter.


> Unlike many other languages, indentation matters. A lot. Similarly to
> Python, indentation indicates where you are. So if I start a bulleted
> list using a leading "* ", then I'm inside that list item as long as I
> maintain that indentation.

About indentation the complaints were that tabulations couldn't be
used, and that the number of required spaces was not always evident
(this was seriously aggravated by the use of a non-monospace font).


> [note style="tip"]
> 
> Except let's go ahead and not require quotes if there's no space.
> 
> [note style=tip]

The current parser doesn't allow for spaces around the equal sign,
this caused a few problems with varying behaviours,
  [note style = "tip"] → SyntaxError
  [note style=tip] → <note type="tip">


(in the example that was given back then)
> :xi:include:[href="legal.xml"]

I forgotten about this (and didn't try it) but there was a request for
a way to use includes (that's probably a comment relevant to your mail
about directives).



        Fred