File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ pub enum ModulePath {
8787#[ serde( untagged) ]
8888pub enum DocString {
8989 DocFormat ( DocFormat ) ,
90+ Literal ( Literal ) ,
9091 String ( String ) ,
9192}
9293
@@ -126,6 +127,19 @@ impl Serialize for DocString {
126127 warn ! ( "Could not render Markdown content: {}" , e) ;
127128 md. to_owned ( )
128129 } ) ) ,
130+ DocString :: Literal ( Literal :: LiteralExpression ( s) ) => serializer. serialize_str ( & s) ,
131+ DocString :: Literal ( Literal :: LiteralDocBook ( db) ) => {
132+ serializer. serialize_str ( & db. render_docbook ( ) . unwrap_or_else ( |e| {
133+ warn ! ( "Could not render DocBook content: {}" , e) ;
134+ db. to_owned ( )
135+ } ) )
136+ }
137+ DocString :: Literal ( Literal :: LiteralMarkdown ( md) ) => {
138+ serializer. serialize_str ( & md. render_markdown ( ) . unwrap_or_else ( |e| {
139+ warn ! ( "Could not render Markdown content: {}" , e) ;
140+ md. to_owned ( )
141+ } ) )
142+ }
129143 }
130144 }
131145}
You can’t perform that action at this time.
0 commit comments