From 0b390cc6f23137ae2b5c30f54fa862fde5d72d30 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sun, 18 May 2014 13:48:35 -0700 Subject: [PATCH] html.entities: switch to using re-replace-with. --- extra/html/entities/entities.factor | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/extra/html/entities/entities.factor b/extra/html/entities/entities.factor index b28f45af60..de006fcd88 100644 --- a/extra/html/entities/entities.factor +++ b/extra/html/entities/entities.factor @@ -2341,10 +2341,5 @@ R/ &(#[0-9]+|#[xX][0-9a-fA-F]+|[^\t\n\f <&#;]{1,32});?/ PRIVATE> -:: html-unescape ( str -- newstr ) - [ - 0 str re-charref [ - drop [ [ str subseq , ] keep 1 + ] dip - [ str subseq replace-charref , ] keep - ] each-match str length str subseq , - ] { } make concat ; +: html-unescape ( str -- newstr ) + re-charref [ rest replace-charref ] re-replace-with ;