Bugs item #1797224, was opened at 2007-09-18 19:52
Message generated for change (Comment added) made by wikipedian
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=179722…
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: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: .categories()
Initial Comment:
This is the relevant part of code in Wikipedia.py, which gets the list of categories on a
page:
catNamespace = '|'.join(site.category_namespaces())
R =
re.compile(r'\[\[\s*(?P<namespace>%s)\s*:\s*(?P<catName>.+?)(?:\|(?P<sortKey>.+?))?\s*\]\]'
% catNamespace)
for match in R.finditer(text):
cat = catlib.Category(site, '%s:%s' % (match.group('namespace'),
match.group('catName')), sortKey = match.group('sortKey'))
result.append(cat)
return result
To me, it means it will also include those category commands that are inside
<noinclude> or <nowiki> or are commented out (<!--) in the returned result,
which should be fixed.
----------------------------------------------------------------------
Comment By: Daniel Herding (wikipedian)
Date:
2007-09-24 11:09
Message:
Logged In: YES
user_id=880694
Originator: NO
one line above the code you pasted, there is this:
# Ignore category links within nowiki tags, pre tags, includeonly
tags,
# and HTML comments
text = removeDisabledParts(text)
So I think we can close this.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=179722…