Add text to the title if the text is given below the coordinates.
[philipp/winterrodeln/wrpylib.git] / wrpylib / mwmarkup.py
index 88f8add9c055cc1af1a5197224439be0e41e51c2..d0543e0ea7c82a6fabc7c33dddefe327a05f8cdd 100644 (file)
@@ -197,13 +197,14 @@ def parse_googlemap(wikitext):
         # Handle a coordinate
         if is_coord(line):
             lon, lat, symbol, title = parse_coord(line)
         # Handle a coordinate
         if is_coord(line):
             lon, lat, symbol, title = parse_coord(line)
-            coords.append((lon, lat, symbol, title))
             while i < len(lines):
                 line = lines[i].strip()
                 i += 1
                 if is_path(line) or is_coord(line):
                     i -= 1
                     break
             while i < len(lines):
                 line = lines[i].strip()
                 i += 1
                 if is_path(line) or is_coord(line):
                     i -= 1
                     break
+                if len(line) > 0 and title is None: title = line
+            coords.append((lon, lat, symbol, title))
             continue
 
         raise RuntimeError(u'Unknown line syntax: ' + line)
             continue
 
         raise RuntimeError(u'Unknown line syntax: ' + line)