瀏覽代碼

Fix for Python 3.

tags/v0.3
Ben Kurtovic 11 年之前
父節點
當前提交
943caede7a
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. +4
    -2
      mwparserfromhell/wikicode.py

+ 4
- 2
mwparserfromhell/wikicode.py 查看文件

@@ -129,10 +129,12 @@ class Wikicode(StringMixIn):
i += len(obj.nodes) - 1
elif recursive:
contexts = node.__iternodes__(self._get_all_nodes)
for code in {ctx for ctx, child in contexts}:
if code and obj in code:
processed = []
for code in (ctx for ctx, child in contexts):
if code and code not in processed and obj in code:
search = self._do_search(obj, recursive, code, literal)
results.extend(search)
processed.append(code)
i += 1

if not results and not literal and recursive:


Loading…
取消
儲存