let lines_of_ts_hdr_opt (doc_settings : t_doc_settings) (cref_table : t_cref_table) (nte_table : t_nte_table) (path : t_path) (hdr_opt : ts_hdr option) : string list = match hdr_opt with | Some (hdr : ts_hdr) -> lines_of_ts_hdr doc_settings cref_table nte_table path hdr | None -> match path with | hd::tl -> ( match hd with |SEC_NODE _ | APP_NODE _ -> [label_of_path doc_settings path;""] |CH_NODE _ -> let indent : string = String.make (doc_settings.left_margin) ' ' in let label : string = label_of_path doc_settings path in let underline :string = make_string (utf_8_length label) "═" in [indent ^ label; indent ^ underline; ""] | _ -> [] ) | [] -> []