Skip to content

Commit f01f978

Browse files
committed
MCInfo: strip nbsp from crafting item names
1 parent bcf43ba commit f01f978

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

MCInfo/plugin.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@
5353
mcwiki_url = 'http://minecraft.gamepedia.com'
5454

5555
def format_text(text):
56-
return utils.str.normalizeWhitespace(text).strip()
56+
text = text.replace('\xa0', '')
57+
text = utils.str.normalizeWhitespace(text)
58+
text = text.strip()
59+
return text
5760

5861
class MCInfo(callbacks.Plugin):
5962
"""Fetches crafting recipes and other interesting information from the Minecraft Wiki."""

0 commit comments

Comments
 (0)