fixed wrong text being selected
This commit is contained in:
parent
108dbc1125
commit
d518708e96
|
@ -69,7 +69,7 @@ utf-16-surrogate-pair-decode() {
|
|||
|
||||
gettext() {
|
||||
local text="$(tail -n 1 "${bot_tmpdir}${1}" | grep -om1\
|
||||
'\("text"\|"caption"\):"\(\\"\|[^"]*\)*"\(,\|}\)' | tail -n1)"
|
||||
'{\?\("text"\|"caption"\):"\(\\"\|[^"]*\)*"\(,\|}\)' | grep -v "^{" | tail -n1)"
|
||||
grep "^\"text\"" <<< "${text}" >/dev/null && utf-16-surrogate-pair-decode "${text:8:-2}"\
|
||||
|| {
|
||||
grep "^\"caption\"" <<< "${text}" >/dev/null && utf-16-surrogate-pair-decode "${text:11:-2}"
|
||||
|
|
Loading…
Reference in New Issue