]> gitweb.factorcode.org Git - factor.git/commitdiff
Merge branch 'master' of git://factorcode.org/git/factor
authorDoug Coleman <erg@jobim.local>
Wed, 15 Apr 2009 03:07:51 +0000 (22:07 -0500)
committerDoug Coleman <erg@jobim.local>
Wed, 15 Apr 2009 03:07:51 +0000 (22:07 -0500)
basis/help/html/html.factor

index d880af5b555bab654f3768ca94340740cf30f22f..f4a874248617f9645421e41e783e1a6b2e502ec0 100644 (file)
@@ -4,24 +4,26 @@ USING: io.encodings.utf8 io.encodings.ascii io.encodings.binary
 io.files io.files.temp io.directories html.streams help kernel
 assocs sequences make words accessors arrays help.topics vocabs
 tools.vocabs help.vocabs namespaces prettyprint io
-vocabs.loader serialize fry memoize unicode.case math.order
-sorting debugger html xml.syntax xml.writer ;
+vocabs.loader serialize fry memoize ascii unicode.case math.order
+sorting debugger html xml.syntax xml.writer math.parser ;
 IN: help.html
 
 : escape-char ( ch -- )
-    dup H{
-        { CHAR: " "__quo__" }
-        { CHAR: * "__star__" }
-        { CHAR: : "__colon__" }
-        { CHAR: < "__lt__" }
-        { CHAR: > "__gt__" }
-        { CHAR: ? "__que__" }
-        { CHAR: \\ "__back__" }
-        { CHAR: | "__pipe__" }
-        { CHAR: / "__slash__" }
-        { CHAR: , "__comma__" }
-        { CHAR: @ "__at__" }
-    } at [ % ] [ , ] ?if ;
+    dup ascii? [
+        dup H{
+            { CHAR: " "__quo__" }
+            { CHAR: * "__star__" }
+            { CHAR: : "__colon__" }
+            { CHAR: < "__lt__" }
+            { CHAR: > "__gt__" }
+            { CHAR: ? "__que__" }
+            { CHAR: \\ "__back__" }
+            { CHAR: | "__pipe__" }
+            { CHAR: / "__slash__" }
+            { CHAR: , "__comma__" }
+            { CHAR: @ "__at__" }
+        } at [ % ] [ , ] ?if
+    ] [ number>string "__" "__" surround % ] if ;
 
 : escape-filename ( string -- filename )
     [ [ escape-char ] each ] "" make ;