Comment 4 for bug 1060784

Revision history for this message
Yves Piguet (yves-piguet) wrote :

In your case, with the current NME code, you could generate something like

[[__foo|{{{__foo}}}]]

It isn't uncommon for urls to contain tildes, so I think it's better to avoid interpreting them in a special way. What about this:

- if the link target and the link text are separate, continue as in the current implementation where the target is used verbatim and the markup in the link text is interpreted the usual way;

- if there is no separate link text, use verbatim what's between the brackets.

So to summarize, if you want to display the link target, don't use a pipe; if you want anything special, the link target comes first and is followed by a pipe and any markup you want.

For unterminated markup, it's handled like with other inline markup, such as

**foo //bar **baz //foobar

NME fixes the markup nesting. Each Creole markup toggles the corresponding style (** = bold on/off, // = italic on/off, etc.) The style is reset at the end of each paragraph. Titles are paragraphs, unlike links. I prefer to keep the rules as simple as possible, especially to handle what might be considered as input errors, so that it's easier to understand what happens and how to fix the input.