소스 검색

Fix for Python 3.

tags/v0.3
Ben Kurtovic 10 년 전
부모
커밋
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:


불러오는 중...
취소
저장