]> gitweb.factorcode.org Git - factor.git/commitdiff
help.html: workaround for cygwin not liking unicode path names
authorSlava Pestov <slava@shill.internal.stack-effects.com>
Wed, 15 Apr 2009 00:24:32 +0000 (19:24 -0500)
committerSlava Pestov <slava@shill.internal.stack-effects.com>
Wed, 15 Apr 2009 00:24:32 +0000 (19:24 -0500)
basis/help/html/html.factor

index d880af5b555bab654f3768ca94340740cf30f22f..3de8dae2186275c597d3955dfb5fe76b0372e740 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
+vocabs.loader serialize fry memoize ascii unicode.case math.order
 sorting debugger html xml.syntax xml.writer ;
 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 ;