Use non-greedy matching for finding the <googlemap> tag so that 2 tags can be on...
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 8 Sep 2013 21:18:47 +0000 (21:18 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 8 Sep 2013 21:18:47 +0000 (21:18 +0000)
git-svn-id: http://www.winterrodeln.org/svn/wrpylib/trunk@1538 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wrpylib/mwmarkup.py

index dbe9baeda64b321939c3fb9d09561a2bb4fe8535..1ec41c0e03ce26587372cffb781255a1f97dcd0a 100644 (file)
@@ -159,7 +159,7 @@ def parse_googlemap(wikitext, detail=False):
         if not match is None: return (float(match.group(2)), float(match.group(1)), None, None)
         return RuntimeError(u'Could not parse line ' + line)
 
-    regexp = re.compile(u"(<googlemap[^>]*>)(.*)(</googlemap>)", re.DOTALL)
+    regexp = re.compile(u"(<googlemap[^>]*>)(.*?)(</googlemap>)", re.DOTALL)
     match = regexp.search(wikitext)
     if match is None: return None
     start = match.start()