Fixed bug in markdown writer: If an ordered list item began with
a marker greater than 3 characters in width, and the item took more than one line, it would appear on the line after the list marker, e.g.: (12) My list item. Multiline. Now it works as follows: (12) My list item. Multiline. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1036 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
7a32ad72e3
commit
27d3657eef
1 changed files with 5 additions and 1 deletions
|
@ -250,7 +250,11 @@ orderedListItemToMarkdown :: WriterOptions -- ^ options
|
|||
-> State WriterState Doc
|
||||
orderedListItemToMarkdown opts marker items = do
|
||||
contents <- blockListToMarkdown opts items
|
||||
return $ hang (text marker) (writerTabStop opts) contents
|
||||
-- The complexities here are needed to ensure that if the list
|
||||
-- marker is 4 characters or longer, the second and following
|
||||
-- lines are indented 4 spaces but the list item begins after the marker.
|
||||
return $ sep [nest (min (3 - length marker) 0) (text marker),
|
||||
nest (writerTabStop opts) contents]
|
||||
|
||||
-- | Convert definition list item (label, list of blocks) to markdown.
|
||||
definitionListItemToMarkdown :: WriterOptions
|
||||
|
|
Loading…
Reference in a new issue