mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Fixing regexp-replace substring index error on non-ascii inputs.
This commit is contained in:
parent
c52873e8b9
commit
aeb881412c
1 changed files with 2 additions and 6 deletions
|
@ -1025,14 +1025,10 @@
|
||||||
(else
|
(else
|
||||||
(string-concatenate
|
(string-concatenate
|
||||||
(cons
|
(cons
|
||||||
(substring-cursor str
|
(substring str start (regexp-match-submatch-start m 0))
|
||||||
(string-index->offset str start)
|
|
||||||
(regexp-match-submatch-start m 0))
|
|
||||||
(append
|
(append
|
||||||
(reverse (regexp-apply-match m str subst))
|
(reverse (regexp-apply-match m str subst))
|
||||||
(list (substring-cursor str
|
(list (substring str (regexp-match-submatch-end m 0) end)))))))))))
|
||||||
(regexp-match-submatch-end m 0)
|
|
||||||
(string-index->offset str end))))))))))))
|
|
||||||
|
|
||||||
;;> Equivalent to \var{regexp-replace}, but replaces all occurrences
|
;;> Equivalent to \var{regexp-replace}, but replaces all occurrences
|
||||||
;;> of \var{re} in \var{str}.
|
;;> of \var{re} in \var{str}.
|
||||||
|
|
Loading…
Add table
Reference in a new issue