Bugs item #3610806, was opened at 2013-04-13 23:53
Message generated for change (Comment added) made by leeyc0
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3610806&group_id=93107

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: leeyc0 (leeyc0)
Assigned to: Nobody/Anonymous (nobody)
Summary: yet another bug in extract_templates_and_params()

Initial Comment:
I found another bug in extract_templates_and_params() if curly bracket exists 
inside template.

Below is the code snippet demonstrating the bug

#!/usr/bin/python
# -*- coding: utf-8 -*-

# you need to download and configure pywikipedia
import sys
sys.path = ["/home/yclee/pywikipedia"] + sys.path
import wikipedia as pywikibot

# bug: extract_templates_and_params returns empty list
pageStr = "{{aaa|name=-{name123}-}}"
print  pywikibot.extract_templates_and_params(pageStr)

# normal
pageStr = "{{aaa|name=name123}}"
print  pywikibot.extract_templates_and_params(pageStr)

(note: -{XXXXX}- is a special syntax in Chinese wikipedia, which the usage is 
to inhibit automatic traditional/simplified Chinese conversion)

----------------------------------------------------------------------

Comment By: leeyc0 (leeyc0)
Date: 2013-04-21 18:19

Message:
This artifact has been marked as a duplicate of artifact 3021792 with
reason:
duplicate

----------------------------------------------------------------------

Comment By: leeyc0 (leeyc0)
Date: 2013-04-13 23:54

Message:
BTW, the bug also there if pageStr is
pageStr = "{{aaa|name={name123}}}"

A simple pair of curly bracket is enough to trigger the bug

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3610806&group_id=93107

_______________________________________________
Pywikipedia-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-bugs

Reply via email to