Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
8d168760
Commit
8d168760
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2003-06-17 16:05:23 by cvscast] Simplify unhilight.cd -- Alain
Original author: cvscast Date: 2003-06-17 16:05:23+00:00
parent
58bc2a6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
web/unhilight.cd
View file @
8d168760
let highlight (Latin1 -> Latin1)
| [ '{{' h ::(Char *?) '}}' ; rest ] ->
[ !h ; highlight rest ]
| [ '%%' h ::(Char *?) '%%' ; rest ] ->
[ !h ; highlight rest ]
| [ c; rest ] -> [ c; highlight rest ]
| [] -> []
;;
match argv with
| [ f ] ->
print (highlight (load_file f))
| [ f ] ->
let [ ('{{' h ::(_ *?) '}}'| h::_)* ] = load_file f in print h
| _ -> raise "Specify an input file !"
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment