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

links containing square brackets are treated differently than by mediawiki #20

Open
larsjsol opened this issue Jul 20, 2012 · 0 comments

Comments

@larsjsol
Copy link

It seems like mwlib treats links containing triple brackets a bit
different than Mediawiki.

For example: "[[WP:IPA for German|[ˈalbɐt ˈaɪnʃtaɪn]]]" is rendered
like this
start_link[ˈalbɐt ˈaɪnʃtaɪn]end_link
by the Wikipedia sandbox, while parser.ParseString() creates this tree:

NamespaceLink target=u'WP:IPA for German' ns=4
u'[\u02c8alb\u0250t \u02c8a\u026an\u0283ta\u026an'
u']\n'

(with the right square bracket is outside the link)

If the link text is removed, like this "[[[ˈalbɐt ˈaɪnʃtaɪn]]]",
Wikipedia displays it as regular text while ParseString creates a
tree that resembles the one above.

I've created a tiny patch that
edit: dosn't work as advertised, sorry.

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

No branches or pull requests

2 participants