1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00

Concatenate HTML lines in Ul elements.

This commit is contained in:
Rob Rix 2015-12-02 16:36:47 -05:00
parent c3cd1edc7d
commit 8cbe16883d

View File

@ -63,7 +63,7 @@ splitTerm source = cata toElement where
splitHTMLIntoLines :: HTML -> [HTML]
splitHTMLIntoLines (Text string) = Text <$> lines string
splitHTMLIntoLines (Span className string) = Span className <$> lines string
splitHTMLIntoLines (Ul className children) = Ul className . splitHTMLIntoLines <$> children
splitHTMLIntoLines (Ul className children) = Ul className <$> foldr combineLines [[]] children
splitHTMLIntoLines (Dt string) = [ Dt string ]
combineLines :: HTML -> [[HTML]] -> [[HTML]]