let lines_of_refs_hdr (doc_settings : t_doc_settings) (doc_class : t_doc_class) : string list = match doc_settings.refs_hdr with |None -> [] |Some (hdr,_) -> let underline_symbol : string = match doc_class with |DOC_CHS -> "═" | _ -> "─" in let indent : string = String.make doc_settings.refs_indent ' ' in let underline = make_string (Int.min (utf_8_length hdr) (doc_settings.doc_width - doc_settings.refs_indent)) underline_symbol in let hdr_lines : string list = lines_of_string doc_settings doc_settings.refs_indent hdr in List.concat [hdr_lines;[indent ^ underline;""]]