1
0
Fork 0

- fixed test to check if acharacter is an emoji.

- returned the whole codepoints list if a char is an emoji.
This commit is contained in:
cage 2023-06-04 14:02:05 +02:00
parent c1c6e6293b
commit c9f7fcb12e
1 changed files with 5 additions and 4 deletions

View File

@ -11,8 +11,9 @@
(not (cl-ppcre:scan "^#" line)))) (not (cl-ppcre:scan "^#" line))))
(defun match-codepoint-p (a b) (defun match-codepoint-p (a b)
(every #'char= a (alexandria:set-equal a
(mapcar #'code-char b))) (mapcar #'code-char b)
:test #'char=))
(defun extract-codepoints (stream) (defun extract-codepoints (stream)
"Extract shotcodes from the emoji table file" "Extract shotcodes from the emoji table file"
@ -1295,8 +1296,8 @@
(defgeneric emojip (codepoints-chars)) (defgeneric emojip (codepoints-chars))
(defmethod emojip ((codepoints-chars list)) (defmethod emojip ((codepoints-chars list))
(first (or (emoji-zwj-sequences-p codepoints-chars) (or (emoji-zwj-sequences-p codepoints-chars)
(emoji-sequences-p codepoints-chars)))) (emoji-sequences-p codepoints-chars)))
(defgeneric starting-emoji (object)) (defgeneric starting-emoji (object))