changeset 321:c958b4dbfa4a

text_x_arnica: verify the image for the item list ( *[[image|alias]]) by wikiutil.isPicture
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Thu, 18 Dec 2008 14:44:59 +0100
parents a9f7a24a567d
children 35bf08ec6596
files data/plugin/parser/text_x_arnica.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/parser/text_x_arnica.py	Thu Dec 18 13:46:08 2008 +0100
+++ b/data/plugin/parser/text_x_arnica.py	Thu Dec 18 14:44:59 2008 +0100
@@ -299,8 +299,8 @@
         for line in quotes:
             if line.startswith('[[') and line.endswith(']]'):
                 img, alias = line[2:-2].split('|', 1)
-                # don't count an image more than once
-                if img.strip() not in image_alias.keys():
+                # don't count an image more than once and verify that it is an image
+                if wikiutil.isPicture(img.strip()) and img.strip() not in image_alias.keys():
                     image_alias[img.strip()] = (self.formatter.text(alias.strip()), counter, img)
                     counter += 1
         return image_alias