quetzai / wikimodel

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

MediaWiki parser does not parse nested [[ ]] constructs (image and wikilinks) correctly #167

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Add the following test somewhere in the MediawikiParserTest (on rev 436 of 
the svn trunk):

test("[[Image:Max stirner.jpg|thumb|[[19th century philosophy|19th century 
philosopher]] [[Max Stirner]], usually considered a prominent early 
[[individualist anarchist]] (sketch by [[Friedrich Engels]]).]]");

The XHTML output is:

==================================================
<div class='wikimodel-document'>
<p><span class='wikimodel-escaped'>[</span><a href='Image:Max'>Image:Max</a> 
stirner.jpg|thumb|<a href='19th century philosophy'>19th century 
philosopher</a> <a href='Max Stirner'>Max Stirner</a>, usually considered a 
prominent early <a href='individualist anarchist'>individualist 
anarchist</a> (sketch by <a href='Friedrich Engels'>Friedrich 
Engels</a>).]]</p>
</div>

The enclosing [[Image:: ]] should not be treated as a regular WikiModel 
reference but as a Section or a Block with an img structure inside along 
with the additional textual caption that holds the real nested references / 
wikilinks.

Original issue reported on code.google.com by olivier....@gmail.com on 7 Jan 2010 at 5:56

GoogleCodeExporter commented 8 years ago
actually this is a dupe of issue 2, please ignore it.

Original comment by olivier....@gmail.com on 7 Jan 2010 at 5:57

GoogleCodeExporter commented 8 years ago

Original comment by thomas.m...@gmail.com on 28 Mar 2010 at 5:45