changeset 1761:f8ddaa296115

Fix hyphenation for demos; parse CSS class 'table' as 'tabl'
author Adam Chlipala <adam@chlipala.net>
date Sun, 13 May 2012 14:27:29 -0400 (2012-05-13)
parents 74fcc977a13d
children a6eab6820b37
files src/demo.sml src/urweb.grm
diffstat 2 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/demo.sml	Sat May 12 15:22:39 2012 -0400
+++ b/src/demo.sml	Sun May 13 14:27:29 2012 -0400
@@ -424,6 +424,10 @@
                            | Settings.Prefix => TextIO.output (outf, "*");
                          TextIO.output (outf, " ");
                          TextIO.output (outf, #to rule);
+                         if #hyphenate rule then
+                             TextIO.output (outf, " [-]")
+                         else
+                             ();
                          TextIO.output (outf, "\n"))) (#rewrites combined);
                 filters "url" (#filterUrl combined);
                 filters "mime" (#filterMime combined);
--- a/src/urweb.grm	Sat May 12 15:22:39 2012 -0400
+++ b/src/urweb.grm	Sun May 13 14:27:29 2012 -0400
@@ -246,7 +246,14 @@
       | EDisjointApp e => tnamesOf e
       | _ => []
 
-fun classOut (s, pos) = (EVar ([], String.translate (fn #"-" => "_" | ch => str ch) s, Infer), pos)
+fun classOut (s, pos) =
+    let
+        val s = case s of
+                    "table" => "tabl"
+                  | _ => s
+    in
+        (EVar ([], String.translate (fn #"-" => "_" | ch => str ch) s, Infer), pos)
+    end
 
 fun parseClass s pos =
     case String.tokens Char.isSpace s of