Also canonicalise anchor parts of articles
Replace spaces in anchors with underscores as spaces are not correct there Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=114 FS#114]
This commit is contained in:
@@ -288,6 +288,11 @@ class RedFamParser( RedFam ):
|
|||||||
article = article.split("#", 1)
|
article = article.split("#", 1)
|
||||||
# Replace underscores in title with spaces
|
# Replace underscores in title with spaces
|
||||||
article[0] = article[0].replace("_", " ")
|
article[0] = article[0].replace("_", " ")
|
||||||
|
|
||||||
|
if len(article) > 1:
|
||||||
|
# other way round, replace spaces with underscores in anchors
|
||||||
|
article[1] = article[1].replace(" ", "_")
|
||||||
|
|
||||||
# Rejoin title and anchor
|
# Rejoin title and anchor
|
||||||
article = "#".join(article)
|
article = "#".join(article)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user