File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 5
5
(* Licence: ISC *)
6
6
(* ********************************************************************* *)
7
7
8
- (* * Important note: this library needs OCaml >= 4.1.0 *)
9
-
10
8
type location = int * int
11
9
and name = string
12
10
and key = string
@@ -40,7 +38,7 @@ let syntax_error s ln cn = raise (Syntax_error (sprintf "(%d:%d): %s." ln cn s))
40
38
let syntax_assert b s ln cn = if not b then syntax_error s ln cn
41
39
42
40
(* * http://tools.ietf.org/html/rfc5545#section-3.3.11 (TEXT) *)
43
- let text_of_raw ( label :string ) = function
41
+ let text_of_raw = function
44
42
| `Raw ((ln , cn ) as location , s ) ->
45
43
let sl = String. length s in
46
44
let open Buffer in
@@ -77,8 +75,8 @@ let text_of_raw (label:string) = function
77
75
feeds read by this program do comply with RFC 5545. *)
78
76
| c -> add_char b c; loop accu (i+ 1 )
79
77
in
80
- label, `Text (location, List. rev (loop [] 0 ))
81
- | x -> label, x
78
+ `Text (location, List. rev (loop [] 0 ))
79
+ | x -> x
82
80
83
81
let lex_ical s =
84
82
let name = Buffer. create 42
Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ val iter :
94
94
(([> `Raw of location * string ] as 'a ) Ical .element -> unit ) ->
95
95
'a Ical .t -> unit
96
96
97
+ (* * *)
97
98
val sort : (([> `Raw of location * string ] as 'a ) Ical .element -> 'a Ical .element -> int ) ->
98
99
'a Ical .t -> 'a Ical .t
99
100
@@ -130,18 +131,17 @@ val is_nonempty_block : 'a Ical.element -> bool
130
131
131
132
(* Value formats *)
132
133
(* ******************************************************************** *)
133
- (* * [text_of_raw label value ] converts [`Raw(loc, s)] to [`Text(loc,sl)]
134
+ (* * [text_of_raw] converts [`Raw(loc, s)] to [`Text(loc,sl)]
134
135
where [sl] is the list of text values in [s]. Note that it is a list
135
136
because in iCalendar a label can be associated with multiple values.
136
- Note that [loc] isn't changed, and [sl] is a [string list] .
137
+ Note that [loc] isn't changed.
137
138
This conversion interpretes backslash-escaped characters and
138
139
commas, the latter are used for separating multiple values.
139
140
(http://tools.ietf.org/html/rfc5545#section-3.3.11) *)
140
141
val text_of_raw :
141
- string ->
142
142
([> `Raw of location * string
143
143
| `Text of location * string list ] as 'a )
144
- -> string * 'a
144
+ -> 'a
145
145
146
146
147
147
(* * A module to represent date-time values. Since there are way
You can’t perform that action at this time.
0 commit comments