aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Soon <[email protected]>2025-08-26 13:34:33 +0100
committerJohn MacFarlane <[email protected]>2025-08-26 18:22:16 +0200
commit1bee23683d10b2e0ed4a539fecf510f01ad4523e (patch)
treee2e0b1ad37f7549a3917c6f0f2ac1e08751fb9ba /src
parent10404ca6d5c1fe95a9cc1e467becc01de56e3e38 (diff)
Support header and footer in MAN reader
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Man.hs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Man.hs b/src/Text/Pandoc/Readers/Man.hs
index 0f60398ef..0260b6e5d 100644
--- a/src/Text/Pandoc/Readers/Man.hs
+++ b/src/Text/Pandoc/Readers/Man.hs
@@ -219,7 +219,16 @@ parseTitle = do
(ControlLine _ args _) <- mmacro "TH"
let adjustMeta =
case args of
- (x:y:z:_) -> setMeta "title" (linePartsToInlines x) .
+ (x:y:z:a:b:_) -> setMeta "title" (linePartsToInlines x) .
+ setMeta "section" (linePartsToInlines y) .
+ setMeta "date" (linePartsToInlines z) .
+ setMeta "footer" (linePartsToInlines a) .
+ setMeta "header" (linePartsToInlines b)
+ [x,y,z,a] -> setMeta "title" (linePartsToInlines x) .
+ setMeta "section" (linePartsToInlines y) .
+ setMeta "date" (linePartsToInlines z) .
+ setMeta "footer" (linePartsToInlines a)
+ [x,y,z] -> setMeta "title" (linePartsToInlines x) .
setMeta "section" (linePartsToInlines y) .
setMeta "date" (linePartsToInlines z)
[x,y] -> setMeta "title" (linePartsToInlines x) .