Skip to content

Commit

Permalink
add missing string-trim in extract-char-set-property
Browse files Browse the repository at this point in the history
  • Loading branch information
ashinn committed May 31, 2024
1 parent f53c642 commit 01d5dd2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/extract-unicode-props.scm
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,17 @@
((or (equal? line "") (eqv? #\# (string-ref line 0)))
(lp ranges))
(else
(let ((ls (string-split (string-trim-comment line #\#) #\;)))
(let ((ls (map string-trim
(string-split (string-trim-comment line #\#) #\;))))
(cond
((< (length ls) 2)
(warn "invalid DerivedCoreProperties line: " line)
(lp ranges))
((string-ci=? prop (string-trim (cadr ls)))
((string-ci=? prop (cadr ls))
(cond
((string-contains (car ls) "..")
=> (lambda (i)
(let* ((str (string-trim (car ls)))
(let* ((str (car ls))
(start (string->number (substring-cursor str (string-cursor-start str) i) 16))
(end (string->number (substring-cursor str (string-cursor-forward str i 2)) 16)))
(if (and start end (<= 0 start end #x110000))
Expand Down

0 comments on commit 01d5dd2

Please sign in to comment.