1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Split <ul> by line.

Surely this can’t be this easy.
This commit is contained in:
Rob Rix 2015-12-02 10:16:41 -05:00
parent 8e25d59506
commit 10e7c748cb

View File

@ -63,6 +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 (Dt string) = [ Dt string ]
classify :: Set.Set Category -> Maybe ClassName