1 ! Copyright (C) 2009 Daniel Ehrenberg.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: assocs io.encodings.binary io.files kernel namespaces sequences
4 values xml xml.entities ;
9 : read-entities-file ( file -- table )
12 : get-html ( -- table )
13 { "lat1" "special" "symbol" } [
14 "resource:basis/xml/entities/html/xhtml-"
15 swap ".ent" 3append read-entities-file
16 ] map first3 assoc-union assoc-union ;
18 get-html to: html-entities
20 : with-html-entities ( quot -- )
21 html-entities swap with-entities ; inline