# HG changeset patch # User Adam Chlipala # Date 1336933649 14400 # Node ID f8ddaa296115d04573d21875bba8ccb8e5f5e203 # Parent 74fcc977a13d435f8d66079b3bedace180c1a6a5 Fix hyphenation for demos; parse CSS class 'table' as 'tabl' diff -r 74fcc977a13d -r f8ddaa296115 src/demo.sml --- 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); diff -r 74fcc977a13d -r f8ddaa296115 src/urweb.grm --- 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