From fed7038ac8d5e3dddbae85a217abab96f406e02d Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 13 May 2012 14:27:29 -0400 Subject: Fix hyphenation for demos; parse CSS class 'table' as 'tabl' --- src/demo.sml | 4 ++++ src/urweb.grm | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/demo.sml b/src/demo.sml index 6897bfa2..747bbd2c 100644 --- a/src/demo.sml +++ b/src/demo.sml @@ -424,6 +424,10 @@ fun make' {prefix, dirname, guided} = | 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 --git a/src/urweb.grm b/src/urweb.grm index c6545f47..1419ef3f 100644 --- a/src/urweb.grm +++ b/src/urweb.grm @@ -246,7 +246,14 @@ fun tnamesOf (e, _) = | 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 -- cgit v1.2.3