From 6bec0de9b28f2899d2147e4836105e36cd228383 Mon Sep 17 00:00:00 2001 From: Nathan TeBlunthuis Date: Fri, 1 Aug 2025 18:52:18 -0700 Subject: [PATCH] configure wikidiff2. --- src/wikiq/__init__.py | 7 ++++--- src/wikiq/wiki_diff_matcher.py | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/wikiq/__init__.py b/src/wikiq/__init__.py index 37f2e22..b5ff1a3 100755 --- a/src/wikiq/__init__.py +++ b/src/wikiq/__init__.py @@ -487,11 +487,12 @@ class WikiqParser: from mw.lib import persistence persist_state = persistence.State() -q + if self.diff: differ = pywikidiff2.pywikidiff2( - numContextLines=1000000, - moved_paragraph_detection_cutoff=200000, + num_context_lines=1000000, + max_word_level_diff_complexity=-1, + moved_paragraph_detection_cutoff=-1, words_cache_capacity=10000, diff_cache_capacity=10000, stats_cache_capacity=100000, diff --git a/src/wikiq/wiki_diff_matcher.py b/src/wikiq/wiki_diff_matcher.py index f9b8234..24a1b57 100644 --- a/src/wikiq/wiki_diff_matcher.py +++ b/src/wikiq/wiki_diff_matcher.py @@ -336,8 +336,9 @@ class WikiDiffMatcher: self.last_tokens = [] self.previous_text = "" self.differ = pywikidiff2.pywikidiff2( - numContextLines=1000000, - moved_paragraph_detection_cutoff=200000, + num_context_lines=1000000, + max_word_level_diff_complexity=-1, + moved_paragraph_detection_cutoff=-1, words_cache_capacity=10000, diff_cache_capacity=10000, stats_cache_capacity=100000,