summaryrefslogtreecommitdiff
path: root/src/monoize.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-12-27 15:34:11 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2012-12-27 15:34:11 -0500
commit53c633b53e8825cb9058fb88e86d1ca7828b83e6 (patch)
tree94682452c654491c184a8e2d43d3dbfdb4e46cf9 /src/monoize.sml
parentbf6fbd81d4e60a87b19f8c8149349217b4620360 (diff)
Add some name-mangling rules to allow XML attribute 'name' and attributes with dashes
Diffstat (limited to 'src/monoize.sml')
-rw-r--r--src/monoize.sml5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/monoize.sml b/src/monoize.sml
index 39e4853b..d324b235 100644
--- a/src/monoize.sml
+++ b/src/monoize.sml
@@ -3364,8 +3364,13 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
val x =
case x of
"Typ" => "Type"
+ | "Nam" => "Name"
| "Link" => "Href"
| _ => x
+
+ val x = String.translate (fn #"_" => "-"
+ | ch => String.str ch) x
+
val xp = " " ^ lowercaseFirst x ^ "=\""
val (e, fm) = fooify env fm (e, t)