Mercurial > urweb
diff src/monoize.sml @ 2090:9a1547596712
Fix XML syntax for closing <input> tags
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 18 Dec 2014 07:48:37 -0500 |
parents | 0d48cfb59b29 |
children | 809bceab15a3 |
line wrap: on
line diff
--- a/src/monoize.sml Sat Dec 06 15:45:41 2014 -0500 +++ b/src/monoize.sml Thu Dec 18 07:48:37 2014 -0500 @@ -3447,6 +3447,8 @@ 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 @@ 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