Merge branch 'fs#159-space-before-anchor' into develop

This commit is contained in:
2017-10-28 18:43:13 +02:00

View File

@@ -297,6 +297,10 @@ class RedFamParser( RedFam ):
article[0] = article[0].replace("_", " ") article[0] = article[0].replace("_", " ")
if len(article) > 1: if len(article) > 1:
# Strip both parts to prevent leading/trailing spaces
article[0] = article[0].strip()
article[1] = article[1].strip()
# other way round, replace spaces with underscores in anchors # other way round, replace spaces with underscores in anchors
article[1] = article[1].replace(" ", "_") article[1] = article[1].replace(" ", "_")