1
0
Fork 0

Compare commits

...

2 commits

Author SHA1 Message Date
dece 0403549897 emoji: fix usage 2021-12-13 15:04:59 +01:00
dece 93a73e0248 wordreference: prevent some crash i guess 2021-12-13 15:04:59 +01:00
2 changed files with 4 additions and 2 deletions

View file

@ -11,7 +11,7 @@ UCD="$HOME/.local/share/emoji/ucd.all.flat.zip"
GREP="rg" GREP="rg"
usage() { usage() {
echo "usage: $0 [-n] [-l LIMIT] FILTER" echo "Usage: $0 [OPTION]... FILTER"
echo "Display emojis based on the name filter provided." echo "Display emojis based on the name filter provided."
echo " -h show usage" echo " -h show usage"
echo " -n hide emoji name" echo " -n hide emoji name"

View file

@ -192,7 +192,9 @@ def parse_common_cells(cells, meaning, is_new_meaning):
def parse_example_cells(cells, meaning): def parse_example_cells(cells, meaning):
"""Parse cells of an example line (pretty much just the last one).""" """Parse cells of an example line (pretty much just the last one)."""
meaning.ex.append(cells[-1].span.text) last_cell = cells[-1]
if (span := last_cell.span):
meaning.ex.append(span.text)
def print_meaning(meaning): def print_meaning(meaning):