adjust the normalize-paste mixin to, by default,
replace non-breaking minus characters with hyphens closes PR 14197 original commit: 35316fd72d637209c8c75068498055d6362a2e0c
This commit is contained in:
parent
595631d266
commit
3cd3d931c2
|
@ -427,11 +427,14 @@
|
|||
|
||||
@defmethod[(string-normalize [s string?]) string?]{
|
||||
Normalizes @racket[s]. Defaults to:
|
||||
@racketblock[(regexp-replace* #rx"\u200b"
|
||||
(string-normalize-nfkc s)
|
||||
"")]
|
||||
@racketblock[(regexp-replace*
|
||||
#rx"\u200b"
|
||||
(regexp-replace*
|
||||
#rx"\u2212"
|
||||
(string-normalize-nfkc s)
|
||||
"-")
|
||||
"")]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@defmixin[text:normalize-paste-mixin (text:basic<%>) (text:normalize-paste<%>)]{
|
||||
|
|
|
@ -1029,7 +1029,13 @@
|
|||
[else
|
||||
(preferences:get 'framework:do-paste-normalization)]))
|
||||
(define/public (string-normalize s)
|
||||
(regexp-replace* #rx"\u200b" (string-normalize-nfkc s) ""))
|
||||
(regexp-replace*
|
||||
#rx"\u200b"
|
||||
(regexp-replace*
|
||||
#rx"\u2212"
|
||||
(string-normalize-nfkc s)
|
||||
"-")
|
||||
""))
|
||||
|
||||
(define/override (do-paste start time)
|
||||
(dynamic-wind
|
||||
|
|
Loading…
Reference in New Issue
Block a user