From be6df7abd9ba197a709664fef695e3c25b3eadac Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 29 Nov 2010 14:30:57 +0000 Subject: [PATCH] improvement of dynamicity engine --- lib/controller/checks.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/controller/checks.py b/lib/controller/checks.py index fe5817d24..e7800b4ab 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -427,6 +427,12 @@ def checkDynamicContent(firstPage, secondPage): if suffix is None and (blocks[i][0] + blocks[i][2] >= len(firstPage)): continue + while prefix and prefix[-1].isalnum(): + prefix = prefix[:-1] + + while suffix and suffix[0].isalnum(): + suffix = suffix[1:] + kb.dynamicMarkings.append((re.escape(prefix[-conf.dynMarkLength:]) if prefix else None, re.escape(suffix[:conf.dynMarkLength]) if suffix else None)) if len(kb.dynamicMarkings) > 0: