Fixed spacing problems in textile nested lists.
This commit is contained in:
parent
d073b16892
commit
cae3f8edba
2 changed files with 4 additions and 8 deletions
|
@ -176,9 +176,10 @@ blockToTextile opts x@(BulletList items) = do
|
|||
return $ " <ul>\n" ++ vcat contents ++ " </ul>\n"
|
||||
else do
|
||||
modify $ \s -> s { stListLevel = stListLevel s ++ "*" }
|
||||
level <- get >>= return . length . stListLevel
|
||||
contents <- mapM (listItemToTextile opts) items
|
||||
modify $ \s -> s { stListLevel = init (stListLevel s) }
|
||||
return $ vcat contents ++ "\n"
|
||||
return $ vcat contents ++ (if level > 1 then "" else "\n")
|
||||
|
||||
blockToTextile opts x@(OrderedList attribs items) = do
|
||||
oldUseTags <- liftM stUseTags get
|
||||
|
@ -190,9 +191,10 @@ blockToTextile opts x@(OrderedList attribs items) = do
|
|||
" </ol>\n"
|
||||
else do
|
||||
modify $ \s -> s { stListLevel = stListLevel s ++ "#" }
|
||||
level <- get >>= return . length . stListLevel
|
||||
contents <- mapM (listItemToTextile opts) items
|
||||
modify $ \s -> s { stListLevel = init (stListLevel s) }
|
||||
return $ vcat contents ++ "\n"
|
||||
return $ vcat contents ++ (if level > 1 then "" else "\n")
|
||||
|
||||
blockToTextile opts (DefinitionList items) = do
|
||||
contents <- withUseTags $ mapM (definitionListItemToTextile opts) items
|
||||
|
|
|
@ -172,8 +172,6 @@ h2. Nested
|
|||
** Tab
|
||||
*** Tab
|
||||
|
||||
|
||||
|
||||
Here's another:
|
||||
|
||||
# First
|
||||
|
@ -181,7 +179,6 @@ Here's another:
|
|||
#* Fee
|
||||
#* Fie
|
||||
#* Foe
|
||||
|
||||
# Third
|
||||
|
||||
Same thing but with paragraphs:
|
||||
|
@ -191,7 +188,6 @@ Same thing but with paragraphs:
|
|||
#* Fee
|
||||
#* Fie
|
||||
#* Foe
|
||||
|
||||
# Third
|
||||
|
||||
h2. Tabs and spaces
|
||||
|
@ -201,7 +197,6 @@ h2. Tabs and spaces
|
|||
** this is an example list item indented with tabs
|
||||
** this is an example list item indented with spaces
|
||||
|
||||
|
||||
h2. Fancy list markers
|
||||
|
||||
<ol start="2" style="list-style-type: decimal;">
|
||||
|
@ -237,7 +232,6 @@ Autonumbering:
|
|||
# More.
|
||||
## Nested.
|
||||
|
||||
|
||||
Should not be a list item:
|
||||
|
||||
M.A. 2007
|
||||
|
|
Loading…
Add table
Reference in a new issue