mirror of
https://github.com/github/semantic.git
synced 2024-12-26 08:25:19 +03:00
Concatenate HTML lines in Ul elements.
This commit is contained in:
parent
c3cd1edc7d
commit
8cbe16883d
@ -63,7 +63,7 @@ splitTerm source = cata toElement where
|
|||||||
splitHTMLIntoLines :: HTML -> [HTML]
|
splitHTMLIntoLines :: HTML -> [HTML]
|
||||||
splitHTMLIntoLines (Text string) = Text <$> lines string
|
splitHTMLIntoLines (Text string) = Text <$> lines string
|
||||||
splitHTMLIntoLines (Span className string) = Span className <$> 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 ]
|
splitHTMLIntoLines (Dt string) = [ Dt string ]
|
||||||
|
|
||||||
combineLines :: HTML -> [[HTML]] -> [[HTML]]
|
combineLines :: HTML -> [[HTML]] -> [[HTML]]
|
||||||
|
Loading…
Reference in New Issue
Block a user