Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MediaWiki parser does not parse nested <ref name=thename>the value</ref> constructs correctly #168

Open
GoogleCodeExporter opened this issue Mar 23, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

The media wiki syntax has a pseudo (invalid) <ref/> tag construct to 
encapsulate inline sections of the markup content to build internal 
reference links. Those constructs are not parsed by the parser as the 
following test shows:

Index: src/test/java/org/wikimodel/wem/test/MediawikiParserTest.java
===================================================================
--- src/test/java/org/wikimodel/wem/test/MediawikiParserTest.java       
(revision 436)
+++ src/test/java/org/wikimodel/wem/test/MediawikiParserTest.java       
(working copy)
@@ -249,6 +249,8 @@
        test("before [#local ancor] after");

        test("not [[a reference] at all!");
+
+        test("<ref name=definitions>test wikimedia reference</ref>");
    }

    /**

That outputs:

==================================================
<div class='wikimodel-document'>
<p>&lt;ref name=definitions&gt;test wikimedia reference</p>
</div>

E.g. it does not seem to be handled at all.

FYI, ref tags can have formatted content such as the following excert
fromt the Anarchism article of the english wikipedia:

<ref name=definitions>*[[Errico Malatesta]],
\"[http://www.marxists.org/archive/malatesta/1930s/xx/toanarchy.htm
Towards Anarchism]\", ''MAN!''. [[Los Angeles]]: International Group
of San Francisco. {{OCLC|3930443}}. *{{cite journal
|url=http://www.theglobeandmail.com/servlet/story/RTGAM.20070514.wxlanarchis
t14/BNStory/lifeWork/home/
|title=Working for The Man |journal=[[The Globe and Mail]]
|accessdate=2008-04-14 |last=Agrell |first=Siri |date=2007-05-14}}
*\"[http://www.britannica.com/eb/article-9117285 Anarchism].\"
''Encyclopædia Britannica''. 2006. Encyclopædia Britannica Premium
Service. 29 August 2006 *\"Anarchism.\" ''The Shorter [[Routledge
Encyclopedia of Philosophy]]''. 2005. p. 14 \"Anarchism is the view
that a society without the state, or government, is both possible and
desirable.\"</ref>

Original issue reported on code.google.com by [email protected] on 7 Jan 2010 at 6:02

@GoogleCodeExporter
Copy link
Author

Applied patch from Arun Reddy

References as Image labels not fixed.
[[ Image:image.png | [[ IMAGE_REF | This is Image]] ]]

Original comment by [email protected] on 28 Mar 2010 at 5:58

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 29 Sep 2010 at 1:49

  • Added labels: MediaWikiSyntax

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant