Commit 899aa0de authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2005-07-30 14:11:51 by afrisch] Empty log message

Original author: afrisch
Date: 2005-07-30 14:11:51+00:00
parent 52c8e1a8
This diff is collapsed.
......@@ -40,6 +40,7 @@ let [<site>[ <title>site
(* Highlighting text between {{...}} *)
let highlight (String -> [ (Char | H.strong | H.i)* ] )
| [ '{{ON}}'; rest ] -> xhighlight rest
| [ '{{%%' h ::(Char *?) '%%}}' ; rest ] ->
[ <strong class="highlight">[<i>h]; highlight rest ]
| [ '{{' h ::(Char *?) '}}' ; rest ] ->
......@@ -53,6 +54,13 @@ let highlight (String -> [ (Char | H.strong | H.i)* ] )
| [ c; rest ] -> [ c; highlight rest ]
| [] -> []
let xhighlight (String -> [ (Char | H.strong | H.i)* ] )
| [ x::('}}' | ':}' | '{{' | '{:') h::Char*?
y::('}}' | ':}' | '{:' | '{{'); rest ] ->
[ !x <strong class="highlight">h !y; xhighlight rest ]
| [ c; rest ] -> [ c; xhighlight rest ]
| [] -> []
(* Split a comma-separated string *)
let split_comma (String -> [String*])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment