mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-29 01:41:20 +08:00
Man writer: use default middle header when metadata does not...
include `header`. This change causes pandoc to omit the middle header parameter when `header` is not set, rather than emitting `""`. The parameter is optional and man will use a default based on the section if it is not specified. Closes #9943.
This commit is contained in:
@@ -8,7 +8,7 @@ $endif$
|
||||
$if(adjusting)$
|
||||
.ad $adjusting$
|
||||
$endif$
|
||||
.TH "$title/nowrap$" "$section/nowrap$" "$date/nowrap$" "$footer/nowrap$" "$header/nowrap$"
|
||||
.TH "$title/nowrap$" "$section/nowrap$" "$date/nowrap$" "$footer/nowrap$"$if(header)$ "$header/nowrap$"$endif$
|
||||
$for(header-includes)$
|
||||
$header-includes$
|
||||
$endfor$
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
```
|
||||
% pandoc -t man -s -Vpandoc-version=''
|
||||
---
|
||||
title: HELLO
|
||||
section: 1
|
||||
---
|
||||
^D
|
||||
.TH "HELLO" "1" "" ""
|
||||
```
|
||||
|
||||
```
|
||||
% pandoc -t man -s -Vpandoc-version=''
|
||||
---
|
||||
title: HELLO
|
||||
section: 1
|
||||
header: Head
|
||||
---
|
||||
^D
|
||||
.TH "HELLO" "1" "" "" "Head"
|
||||
```
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH "Pandoc Test Suite" "" "July 17, 2006" "" ""
|
||||
.TH "Pandoc Test Suite" "" "July 17, 2006" ""
|
||||
.PP
|
||||
This is a set of tests for pandoc.
|
||||
Most of them are adapted from John Gruber\[cq]s markdown test suite.
|
||||
|
||||
Reference in New Issue
Block a user