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 (title', section) = case reverse cmdName of
|
||||
(')':d:'(':xs) | d `elem` ['0'..'9'] ->
|
||||
(text (reverse xs), text [d])
|
||||
xs -> (text (reverse xs), empty)
|
||||
(text (reverse xs), char d)
|
||||
xs -> (text (reverse xs), doubleQuotes empty)
|
||||
let extras = map (doubleQuotes . text . removeLeadingTrailingSpace) $
|
||||
splitBy '|' rest
|
||||
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
|
||||
This is a set of tests for pandoc\. Most of them are adapted from
|
||||
John Gruber's markdown test suite\.
|
||||
|
@ -747,4 +747,4 @@ In quote\.
|
|||
.PP
|
||||
In list\.
|
||||
.SH AUTHORS
|
||||
John MacFarlane, Anonymous
|
||||
John MacFarlane, Anonymous
|
||||
|
|
Loading…
Reference in a new issue