diff --git a/src/Text/Pandoc/Readers/Mdoc.hs b/src/Text/Pandoc/Readers/Mdoc.hs index 2b7ad6b30516..9692134644b6 100644 --- a/src/Text/Pandoc/Readers/Mdoc.hs +++ b/src/Text/Pandoc/Readers/Mdoc.hs @@ -248,9 +248,13 @@ parsePrologue = do macro "Dt" (Lit title _) <- lit (Lit section _) <- lit + arch <- optionMaybe (toString <$> lit) eol emptyMacro "Os" - let adjust = B.setMeta "title" (B.str title) . B.setMeta "date" date . B.setMeta "section" (B.str section) + let adjust = B.setMeta "title" (B.str title) + . B.setMeta "date" date + . B.setMeta "section" (B.str section) + . maybe id (B.setMeta "architecture" . B.str) arch modifyState $ \s -> s{metadata = adjust $ metadata s} shToSectionMode :: T.Text -> MdocSection