123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899moduleOf_document=struct(** Get plain text doc-comment from a doc comment *)letrecsources=lettoken=function|Odoc_document.Types.Source.Elte->inlinee|Tag(_,t)->sourcetinString.concat""@@List.maptokensandinlinei=letoneo=matcho.Odoc_document.Types.Inline.descwith|Textt->t|Entity"#45"->"-"|Entity"gt"->">"|Entitye->"&"^e|Linebreak->"\n"|Styled(_,t)->inlinet|Link(_,t)->inlinet|InternalLink{content;_}->inlinecontent|Sources->sources|Mathm->m|Raw_markup_->""inString.concat""@@List.maponeiletrecdocumented_srcd=letoneo=matchowith|Odoc_document.Types.DocumentedSrc.Codec->sourcec|Documented{code;_}->inlinecode|Nested{code;_}->documented_srccode|Subpage_->""|Alternative(Expansion{summary;_})->sourcesummaryinString.concat""@@List.maponedendmoduleOf_comments=struct(** Get plain text doc-comment from a doc comment *)letget_valuex=x.Odoc_model.Location_.valueletrecstring_of_doc(doc:Odoc_model.Comment.docs)=doc|>List.mapget_value|>List.maps_of_block_element|>String.concat"\n"ands_of_block_element(be:Odoc_model.Comment.block_element)=matchbewith|`Paragraphis->inlinesis|`Tag_->""|`List(_,ls)->List.map(funx->x|>List.mapget_value|>List.mapnestable)ls|>List.concat|>String.concat" "|`Heading(_,_,h)->inlinesh|`Modules_->""|`Code_block(_,s,_todo)->s|>get_value|`Verbatimv->v|`Math_blockm->m|`Table_->(* TODO *)""andnestable(n:Odoc_model.Comment.nestable_block_element)=s_of_block_element(n:>Odoc_model.Comment.block_element)andinlinesis=is|>List.mapget_value|>List.mapinline|>String.concat""andinline(i:Odoc_model.Comment.inline_element)=matchiwith|`Code_spans->s|`Wordw->w|`Math_spanm->m|`Space->" "|`Reference(_,c)->link_contentc|`Link(_,c)->link_contentc|`Styled(_,b)->inlinesb|`Raw_markup(_,_)->""andlink_contentl=l|>List.mapget_value|>List.mapnon_link_inline_element|>String.concat""andnon_link_inline_element(n:Odoc_model.Comment.non_link_inline_element)=inline(n:>Odoc_model.Comment.inline_element)endletof_typete=lette_text=Odoc_document.ML.type_exprteinlette_doc=Odoc_document.Codefmt.renderte_textinOf_document.sourcete_docletof_docdoc=Of_comments.string_of_docdocletof_recordfields=lette_text=Odoc_document.ML.recordfieldsinOf_document.documented_srcte_text