Prevent lowercase article titles in Parser
Since real lowercase article titles are not allowed, make sure to convert all first letters of article titles to uppercase. This is neccessary since pywikibot will return article titles like this. Related Task: [FS#157](https://fs.golderweb.de/index.php?do=details&task_id=157)
This commit is contained in:
@@ -284,6 +284,13 @@ class RedFamParser( RedFam ):
|
||||
for link in heading.ifilter_wikilinks():
|
||||
article = str( link.title ).strip()
|
||||
|
||||
# Short circuit empty links
|
||||
if not article:
|
||||
continue
|
||||
|
||||
# Make sure first letter is uppercase
|
||||
article = article[0].upper() + article[1:]
|
||||
|
||||
# Split in title and anchor part
|
||||
article = article.split("#", 1)
|
||||
# Replace underscores in title with spaces
|
||||
|
||||
Reference in New Issue
Block a user