summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2014-12-18 07:48:37 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2014-12-18 07:48:37 -0500
commit509e9564fe6655fe79e70decf2a61a6a6d3761ba (patch)
tree0d19eed502bbe0d5e7e8c98e41316426441d5afd /src
parentd47f51e33733c851a53feb308ddaee3924910371 (diff)
Fix XML syntax for closing <input> tags
Diffstat (limited to 'src')
-rw-r--r--src/monoize.sml4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/monoize.sml b/src/monoize.sml
index 6563da8b..392a05c1 100644
--- a/src/monoize.sml
+++ b/src/monoize.sml
@@ -3447,6 +3447,8 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
NONE => tagStart
| SOME extra => (L'.EStrcat (tagStart, extra), loc)
+ val firstWord = Substring.string o #1 o Substring.splitl (fn ch => not (Char.isSpace ch)) o Substring.full
+
fun normal () =
let
val (xml, fm) = monoExp (env, st, fm) xml
@@ -3457,7 +3459,7 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
in
((L'.EStrcat ((L'.EStrcat (tagStart, strH ">"), loc),
(L'.EStrcat (xml,
- strH (String.concat ["</", tag, ">"])), loc)),
+ strH (String.concat ["</", firstWord tag, ">"])), loc)),
loc),
fm)
end