- (* All sections have sectionnames? *)
- List.iter (function (sectionnames, _, _)
- when string_is_whitespace sectionnames ->
- add_error ("Every section must have a title.");
- | _ -> ())
- model.contents;
+ (* All sections after the first one have sectionnames? The first
+ * section ONLY is allowed to have an empty title.
+ *)
+ if model.contents <> [] then
+ List.iter (function (sectionnames, _, _)
+ when string_is_whitespace sectionnames ->
+ add_error
+ ("Every section except the first must have a title.");
+ | _ -> ())
+ (List.tl model.contents);