- Timestamp:
- Dec 4, 2022, 7:18:52 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/text.ml
r3 r38 26 26 let set key m = try String_map.find (String.lowercase_ascii key) m.stringset_map with Not_found -> String_set.empty 27 27 let str_set key m = String_set.to_string @@ set key m 28 let with_str_set m key str = { m with stringset_map = String_map.add (String.lowercase_ascii key) (String_set.of_string str) m.stringset_map } 28 let with_str_set m key str = { m with 29 stringset_map = String_map.add (String.lowercase_ascii key) (String_set.of_string str) m.stringset_map 30 } 29 31 30 32 let with_kv x (k,v) = … … 38 40 | "date" -> { x with date = Date.{ x.date with created = Date.of_string v }} 39 41 | "date-edited"-> { x with date = Date.{ x.date with edited = Date.of_string v }} 40 | "licences" | "topics" | "keywords" | " series" as k -> with_str_set x k v42 | "licences" | "topics" | "keywords" | "references" | "series" as k -> with_str_set x k v 41 43 | k -> { x with string_map = String_map.add k (trim v) x.string_map } 42 44 … … 78 80 s "Topics" (str_set "topics" x); 79 81 s "Keywords" (str_set "keywords" x); 82 s "References"(str_set "references" x); 80 83 s "Series" (str_set "series" x); 81 84 s "Abstract" (str "abstract" x);
Note:
See TracChangeset
for help on using the changeset viewer.