Hide HTML entity if it doesn't exist
Signed-off-by: Ivan Boothe <ivan@rootwork.org>
This commit is contained in:
parent
2462364d46
commit
d225b02bc9
6
main.py
6
main.py
|
@ -86,15 +86,17 @@ class KeywordQueryEventListener(EventListener):
|
||||||
encoded = htmlentities.encode(char.character)
|
encoded = htmlentities.encode(char.character)
|
||||||
if "&" in encoded:
|
if "&" in encoded:
|
||||||
sep = " - "
|
sep = " - "
|
||||||
|
html = encoded
|
||||||
else:
|
else:
|
||||||
sep = ""
|
sep = ""
|
||||||
|
html = ""
|
||||||
items.append(
|
items.append(
|
||||||
ExtensionResultItem(
|
ExtensionResultItem(
|
||||||
icon=image_path,
|
icon=image_path,
|
||||||
name=char.name.capitalize() + " - " + char.character,
|
name=char.name.capitalize() + " - " + char.character,
|
||||||
description=char.block + " - U+" + char.code + sep + encoded,
|
description=char.block + " - U+" + char.code + sep + html,
|
||||||
on_enter=CopyToClipboardAction(char.character),
|
on_enter=CopyToClipboardAction(char.character),
|
||||||
on_alt_enter=CopyToClipboardAction(encoded),
|
on_alt_enter=CopyToClipboardAction(html),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return RenderResultListAction(items)
|
return RenderResultListAction(items)
|
||||||
|
|
Loading…
Reference in a new issue