let reference_of_ts_nte_ref (doc_settings : t_doc_settings) (cref_table : t_cref_table) (nte_path : t_path) (nte_ref : Doc_types.ts_nte_ref) : tr_blk_nte option = match nte_ref with |Cs_nte_ref (nte_id,i) -> let rec aux (cref_table : t_cref_table) : tr_blk_nte option = match cref_table with |[] -> None |(table_id, table_path, Cref_element_blk_nte blk_nte) :: tl -> ( match ids_match nte_id nte_path table_id table_path with |true -> Some blk_nte |false -> aux tl ) |_::tl -> aux tl in aux cref_table