瀏覽代碼

Ensure the text is stripped properly.

tags/v0.2
Ben Kurtovic 10 年之前
父節點
當前提交
2dfdf1bd4a
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      earwigbot/wiki/copyvios/parsers.py

+ 1
- 1
earwigbot/wiki/copyvios/parsers.py 查看文件

@@ -64,7 +64,7 @@ class ArticleTextParser(BaseTextParser):
"""
wikicode = mwparserfromhell.parse(self.text)
clean = wikicode.strip_code(normalize=True, collapse=True)
self.clean = clean.replace("\n\n", "\n") # Collapse extra newlines
self.clean = clean.replace("\n\n", "\n").strip()
return self.clean

def chunk(self, nltk_dir, max_chunks, max_query=256):


Loading…
取消
儲存