bryonjacob / wikimodel

Automatically exported from code.google.com/p/wikimodel
0 stars 0 forks source link

Adding support for link parsing #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Right now wikimodel doesn't parse the content of links (references). It's a
pity since it makes using the different wiki syntaxes hard.

For example xwiki's links can be [label>link] or [label|link].

The link syntax is part of the wiki's syntax so it would make sense to me
if wikimodel also supported parsing the links.

Right now we're going to have to write 4 new link parsers in the xwiki
project in order to support all syntaxes (wiki, creole, jspwiki, mediawiki).

Thanks
-Vincent

Original issue reported on code.google.com by vmas...@gmail.com on 6 Jun 2008 at 3:03

GoogleCodeExporter commented 8 years ago
Reference management was changed. Now all explicit references are wrapped by a
structured object - WikiReference. Each specific wiki syntax can implement its 
own
reference parser. 
The listener interface was changed as well. Now it contains two methods: 
{{{
  // This method is used to notify about URIs found in the text
  void onReference(String ref);

  // This method is called when an explicitly defined link was found in the text
  void onReference(WikiReference ref);
}}}

Original comment by mikhail....@gmail.com on 15 Jun 2008 at 10:55

GoogleCodeExporter commented 8 years ago
Thanks Mikhail. 

So does it mean the 2 methods are called for say [Space.Doc]?

Why not have a single method? I looks a bit strange that the onReference method 
would
be called twice IMO.

Original comment by vmas...@gmail.com on 16 Jun 2008 at 7:25