Man writer:
+ Make sure to include "" if no section is specified in a man page TH line. + Updated man writer tests. git-svn-id: https://pandoc.googlecode.com/svn/trunk@758 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
062cdfe7de
commit
9f38f9d039
2 changed files with 4 additions and 4 deletions
|
@ -73,8 +73,8 @@ metaToMan options (Meta title authors date) = do
|
||||||
let (cmdName, rest) = break (== ' ') $ render titleText
|
let (cmdName, rest) = break (== ' ') $ render titleText
|
||||||
let (title', section) = case reverse cmdName of
|
let (title', section) = case reverse cmdName of
|
||||||
(')':d:'(':xs) | d `elem` ['0'..'9'] ->
|
(')':d:'(':xs) | d `elem` ['0'..'9'] ->
|
||||||
(text (reverse xs), text [d])
|
(text (reverse xs), char d)
|
||||||
xs -> (text (reverse xs), empty)
|
xs -> (text (reverse xs), doubleQuotes empty)
|
||||||
let extras = map (doubleQuotes . text . removeLeadingTrailingSpace) $
|
let extras = map (doubleQuotes . text . removeLeadingTrailingSpace) $
|
||||||
splitBy '|' rest
|
splitBy '|' rest
|
||||||
let head = (text ".TH") <+> title' <+> section <+>
|
let head = (text ".TH") <+> title' <+> section <+>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.TH "Pandoc Test Suite" "" "July 17, 2006"
|
.TH Pandoc "" "July 17, 2006" "Test Suite"
|
||||||
.PP
|
.PP
|
||||||
This is a set of tests for pandoc\. Most of them are adapted from
|
This is a set of tests for pandoc\. Most of them are adapted from
|
||||||
John Gruber's markdown test suite\.
|
John Gruber's markdown test suite\.
|
||||||
|
@ -747,4 +747,4 @@ In quote\.
|
||||||
.PP
|
.PP
|
||||||
In list\.
|
In list\.
|
||||||
.SH AUTHORS
|
.SH AUTHORS
|
||||||
John MacFarlane, Anonymous
|
John MacFarlane, Anonymous
|
||||||
|
|
Loading…
Reference in a new issue