diff options
author | 2011-01-23 11:18:24 -0500 | |
---|---|---|
committer | 2011-01-23 11:18:24 -0500 | |
commit | e7e90fc64b6b42378fdff9fa23e2b915dc2120fb (patch) | |
tree | 9ec3f5d2129923f90c71e83420cbb0b6e6583ca2 /src/monoize.sml | |
parent | f2ceaacdcff9a9cb1b6b2b6030ffa087de44b811 (diff) |
Allow CSS class specification for <form>
Diffstat (limited to 'src/monoize.sml')
-rw-r--r-- | src/monoize.sml | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/monoize.sml b/src/monoize.sml index e7354e98..25594e1f 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -3390,10 +3390,12 @@ fun monoExp (env, st, fm) (all as (e, loc)) = | _ => normal (tag, NONE, NONE)) end - | L.EApp ((L.ECApp ( - (L.ECApp ((L.EFfi ("Basis", "form"), _), _), _), - (L.CRecord (_, fields), _)), _), - xml) => + | L.EApp ( + (L.EApp ((L.ECApp ( + (L.ECApp ((L.EFfi ("Basis", "form"), _), _), _), + (L.CRecord (_, fields), _)), _), + class), _), + xml) => let fun findSubmit (e, _) = case e of @@ -3518,6 +3520,18 @@ fun monoExp (env, st, fm) (all as (e, loc)) = else action + val stt = (L'.TFfi ("Basis", "string"), loc) + val (class, fm) = monoExp (env, st, fm) class + val action = (L'.EStrcat (action, + (L'.ECase (class, + [((L'.PNone stt, loc), + (L'.EPrim (Prim.String ""), loc)), + ((L'.PSome (stt, (L'.PVar ("x", stt), loc)), loc), + (L'.EStrcat ((L'.EPrim (Prim.String " class=\""), loc), + (L'.EStrcat ((L'.ERel 0, loc), + (L'.EPrim (Prim.String "\""), loc)), loc)), loc))], + {disc = (L'.TOption stt, loc), + result = stt}), loc)), loc) in ((L'.EStrcat ((L'.EStrcat ((L'.EPrim (Prim.String "<form method=\"post\""), loc), (L'.EStrcat (action, |