MCInfo: strip nbsp from crafting item names

This commit is contained in:
James Lu 2019-12-31 23:08:00 -08:00
parent bcf43ba48d
commit f01f9789fc

View File

@ -53,7 +53,10 @@ from bs4 import BeautifulSoup
mcwiki_url = 'http://minecraft.gamepedia.com'
def format_text(text):
return utils.str.normalizeWhitespace(text).strip()
text = text.replace('\xa0', '')
text = utils.str.normalizeWhitespace(text)
text = text.strip()
return text
class MCInfo(callbacks.Plugin):
"""Fetches crafting recipes and other interesting information from the Minecraft Wiki."""