terrain2wiki: Remove leading/trailing whitespace in lines before parsing

The Dark Flagstones terrain had .aliasof at the last line before the
closing tag, which caused a newline to be output right before </code> in
the wiki page, and in turn causing MW to generate invalid XHTML.

This change makes the generated wiki page valid XHTML again (except for
another problem with the actual glamdrol theme, not the page contents).
This commit is contained in:
Ignacio R. Morelle 2012-05-12 21:29:00 +00:00
parent 15510a8dcd
commit d65124a8c2

View file

@ -55,7 +55,7 @@ def parse_terrain(data):
if i[0].startswith(" "):
continue
# Create a dictionnary of key and values
content = dict([v.split("=") for v in i])
content = dict([v.strip().split("=") for v in i])
# Hidden things shouldn't be displayed
if 'hidden' in content:
continue