diff options
-rw-r--r-- | doc/intro.ur | 6 | ||||
-rw-r--r-- | src/tutorial.sml | 27 |
2 files changed, 30 insertions, 3 deletions
diff --git a/doc/intro.ur b/doc/intro.ur index 2a571068..1bdc6de1 100644 --- a/doc/intro.ur +++ b/doc/intro.ur @@ -1,6 +1,6 @@ (* Introduction *) -(* This work is licensed under a <a href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License</a>. *) +(* This tutorial is licensed under a <a href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License</a>. *) (* Test evaluation.... *) @@ -10,4 +10,6 @@ fun f [a] (x : a) : a = x f 6 (* end *) -(* Did it work? *) +(** Section *) + +val y = 9 diff --git a/src/tutorial.sml b/src/tutorial.sml index 2b875c0b..a2156adc 100644 --- a/src/tutorial.sml +++ b/src/tutorial.sml @@ -75,7 +75,26 @@ fun fixupFile (fname, title) = val (befor, after) = Substring.position "<span class=\"comment-delimiter\">(* </span><span class=\"comment\">" source in if Substring.isEmpty after then - TextIO.outputSubstr (outf, source) + let + val (befor, after) = Substring.position "<span class=\"comment-delimiter\">(** </span><span class=\"comment\">" source + in + if Substring.isEmpty after then + TextIO.outputSubstr (outf, source) + else + let + val (befor', after) = Substring.position " </span><span class=\"comment-delimiter\">*)</span>" + (Substring.slice (after, 65, NONE)) + in + if Substring.isEmpty after then + TextIO.outputSubstr (outf, source) + else + (TextIO.outputSubstr (outf, befor); + TextIO.output (outf, "<h2>"); + proseLoop befor'; + TextIO.output (outf, "</h2>"); + loop (Substring.slice (after, 49, NONE))) + end + end else let val (befor', after) = Substring.position " </span><span class=\"comment-delimiter\">*)</span>" @@ -105,6 +124,12 @@ fun fixupFile (fname, title) = TextIO.output (outf, "\t\tpadding: 5px;\n"); TextIO.output (outf, "\t\tfont-size: larger;\n"); TextIO.output (outf, "\t}\n"); + TextIO.output (outf, "\th2 {\n"); + TextIO.output (outf, "\t\tfont-family: Arial;\n"); + TextIO.output (outf, "\t\tfont-size: 20pt;\n"); + TextIO.output (outf, "\t\tbackground-color: #99FF99;\n"); + TextIO.output (outf, "\t\tpadding: 5px;\n"); + TextIO.output (outf, "\t}\n"); TextIO.output (outf, "-->\n"); TextIO.output (outf, "</style>\n"); TextIO.output (outf, "<title>"); |