Permalink
Browse files

Include zero-width-space in string-normalize.

Closes PR 12683.
  • Loading branch information...
1 parent f1b4c86 commit 9ed78f275240694e4c1c9b876be70993e0b7c84e @dyoo committed Feb 14, 2013
Showing with 6 additions and 2 deletions.
  1. +2 −1 collects/framework/private/text.rkt
  2. +4 −1 collects/scribblings/framework/text.scrbl
@@ -922,7 +922,8 @@
normalize?))]
[else
(preferences:get 'framework:do-paste-normalization)]))
- (define/public (string-normalize s) (string-normalize-nfkc s))
+ (define/public (string-normalize s)
+ (regexp-replace* #rx"\u200b" (string-normalize-nfkc s) ""))
(define/override (do-paste start time)
(dynamic-wind
@@ -383,7 +383,10 @@
}
@defmethod[(string-normalize [s string?]) string?]{
- Normalizes @racket[s]. Defaults to @racket[string-normalize-nfkc].
+ Normalizes @racket[s]. Defaults to:
+ @racketblock[(regexp-replace* #rx"\u200b"
+ (string-normalize-nfkc s)
+ "")]
}
}

0 comments on commit 9ed78f2

Please sign in to comment.