@@ -448,7 +448,8 @@ bool AppendIfDocCmdGroup(std::ostream& os, MarkdownContext const& ctx,
448448 if (AppendIfDocTitleCmdGroup (os, ctx, node)) return true ;
449449 // Unexpected: hruler, preformatted
450450 if (AppendIfProgramListing (os, ctx, node)) return true ;
451- // Unexpected: verbatim, indexentry
451+ // Unexpected: indexentry
452+ if (AppendIfVerbatim (os, ctx, node)) return true ;
452453 if (AppendIfOrderedList (os, ctx, node)) return true ;
453454 if (AppendIfItemizedList (os, ctx, node)) return true ;
454455 if (AppendIfSimpleSect (os, ctx, node)) return true ;
@@ -508,6 +509,16 @@ bool AppendIfProgramListing(std::ostream& os, MarkdownContext const& ctx,
508509 return true ;
509510}
510511
512+ // The type for `verbatim` is a simple string.
513+ bool AppendIfVerbatim (std::ostream& os, MarkdownContext const & ctx,
514+ pugi::xml_node const & node) {
515+ if (std::string_view{node.name ()} != " verbatim" ) return false ;
516+ os << ctx.paragraph_start << ctx.paragraph_indent << " ```\n "
517+ << ctx.paragraph_indent << node.child_value () << " \n "
518+ << ctx.paragraph_indent << " ```" ;
519+ return true ;
520+ }
521+
511522// The type for `codeline` is basically a sequence of highlights (think "syntax
512523// highlighting", not "important things"). We will discard this information and
513524// rely in the target markdown to generate the right coloring.
0 commit comments