summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-12-29 13:34:03 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-12-29 13:34:03 -0500
commitd662dfd8d76d24b5ecbbff9503c84e908c538301 (patch)
tree93b8b53446f1bc27c7e471e78b89af67a2c4fcf2 /src
parentaddaa90f75a4901481fb0f0f5890fff7e85e94db (diff)
ctextarea; s/header/include in the manual
Diffstat (limited to 'src')
-rw-r--r--src/monoize.sml23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/monoize.sml b/src/monoize.sml
index e9d90ecc..0f03111c 100644
--- a/src/monoize.sml
+++ b/src/monoize.sml
@@ -2985,6 +2985,29 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
| "coption" => normal ("option", NONE, NONE)
+ | "ctextarea" =>
+ (case List.find (fn ("Source", _, _) => true | _ => false) attrs of
+ NONE =>
+ let
+ val (ts, fm) = tagStart "textarea"
+ in
+ ((L'.EStrcat (ts,
+ (L'.EPrim (Prim.String " />"), loc)),
+ loc), fm)
+ end
+ | SOME (_, src, _) =>
+ let
+ val sc = strcat [str "tbx(exec(",
+ (L'.EJavaScript (L'.Script, src), loc),
+ str "))"]
+ val sc = setAttrs sc
+ in
+ (strcat [str "<script type=\"text/javascript\">",
+ sc,
+ str "</script>"],
+ fm)
+ end)
+
| "tabl" => normal ("table", NONE, NONE)
| _ => normal (tag, NONE, NONE))
end