Skip to content

Commit

Permalink
Support architecture argument to Dt
Browse files Browse the repository at this point in the history
  • Loading branch information
silby committed Nov 3, 2024
1 parent 5b4e922 commit 70771de
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Text/Pandoc/Readers/Mdoc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 70771de

Please sign in to comment.