]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/www/lambdadelta/bin/xhtbl/textUnparser.ml
- we begin the new site based on ld_web
[helm.git] / helm / www / lambdadelta / bin / xhtbl / textUnparser.ml
index 54995e96bb967591d04b536907bde5322e093955..fec699bcbad3ac63d0d8936977778944d1d630be 100644 (file)
@@ -41,10 +41,12 @@ let border tb =
 let css tc =
    P.sprintf "\"%s\"" (S.concat " " tc)
 
+let text = function
+   | T.Plain s       -> P.sprintf "\"%s\"" s
+   | T.Link (uri, s) -> P.sprintf "@(\"%s\" \"%s\")" uri s
+
 let key = function
-   | T.Text sl       ->
-      let map s = P.sprintf "\"%s\"" s in
-      S.concat " + " (L.map map sl)
+   | T.Text sl       -> S.concat " + " (L.map text sl)
    | T.Glue None     -> "*"
    | T.Glue (Some i) -> P.sprintf "%u" i