summaryrefslogtreecommitdiff
path: root/src/cjr_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2010-01-02 14:54:15 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2010-01-02 14:54:15 -0500
commitf0670d5a5a60c1bdda0277fcf74f2cf3f028c5b4 (patch)
tree96967222b55ddf2e8ab94d78bbb13cf84fd1ddd4 /src/cjr_print.sml
parentc8de04e4f81490bfde750375c55de2a260072e82 (diff)
JavaScript urlification; more lenient export pattern in Corify; only include scripts in pages that use JavaScript
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r--src/cjr_print.sml22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index 2cfd0663..8c5a24b4 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -2591,15 +2591,19 @@ fun p_file env (ds, ps) =
val scripts =
case side of
ServerOnly => ""
- | _ => "<script src=\\\""
- ^ OS.Path.joinDirFile {dir = Settings.getUrlPrefix (),
- file = "app.js"}
- ^ "\\\"></script>\\n"
-
- val scripts = foldl (fn (x, scripts) =>
- scripts
- ^ "<script src=\\\"" ^ x ^ "\\\"></script>\\n")
- scripts (Settings.getScripts ())
+ | _ =>
+ let
+ val scripts =
+ "<script src=\\\""
+ ^ OS.Path.joinDirFile {dir = Settings.getUrlPrefix (),
+ file = "app.js"}
+ ^ "\\\"></script>\\n"
+ in
+ foldl (fn (x, scripts) =>
+ scripts
+ ^ "<script src=\\\"" ^ x ^ "\\\"></script>\\n")
+ scripts (Settings.getScripts ())
+ end
in
string scripts
end,