@@ -176,9 +176,10 @@ blockToTextile opts x@(BulletList items) = do
176 return $ " <ul>\n" ++ vcat contents ++ " </ul>\n"
176 return $ " <ul>\n" ++ vcat contents ++ " </ul>\n"
178 modify $ \s -> s { stListLevel = stListLevel s ++ "*" }
178 modify $ \s -> s { stListLevel = stListLevel s ++ "*" }
179+ level <- get >>= return . length . stListLevel
179 contents <- mapM (listItemToTextile opts) items
180 contents <- mapM (listItemToTextile opts) items
180 modify $ \s -> s { stListLevel = init (stListLevel s) }
181 modify $ \s -> s { stListLevel = init (stListLevel s) }
181− return $ vcat contents ++ "\n"
182+ return $ vcat contents ++ (if level > 1 then "" else "\n")
183blockToTextile opts x@(OrderedList attribs items) = do
184blockToTextile opts x@(OrderedList attribs items) = do
184 oldUseTags <- liftM stUseTags get
185 oldUseTags <- liftM stUseTags get
@@ -190,9 +191,10 @@ blockToTextile opts x@(OrderedList attribs items) = do
190 " </ol>\n"
191 " </ol>\n"
192 modify $ \s -> s { stListLevel = stListLevel s ++ "#" }
193 modify $ \s -> s { stListLevel = stListLevel s ++ "#" }
194+ level <- get >>= return . length . stListLevel
193 contents <- mapM (listItemToTextile opts) items
195 contents <- mapM (listItemToTextile opts) items
194 modify $ \s -> s { stListLevel = init (stListLevel s) }
196 modify $ \s -> s { stListLevel = init (stListLevel s) }
195− return $ vcat contents ++ "\n"
197+ return $ vcat contents ++ (if level > 1 then "" else "\n")
197blockToTextile opts (DefinitionList items) = do
199blockToTextile opts (DefinitionList items) = do
198 contents <- withUseTags $ mapM (definitionListItemToTextile opts) items
200 contents <- withUseTags $ mapM (definitionListItemToTextile opts) items