mirror of
https://github.com/github/semantic.git
synced 2024-12-18 04:11:48 +03:00
Last
returns non-Nothing
, so bind instead.
This commit is contained in:
parent
85d141e924
commit
674301ce1f
@ -231,9 +231,9 @@ rightLines rows = right <$> rows
|
||||
|
||||
openElement :: HTML -> Maybe HTML
|
||||
openElement Break = Nothing
|
||||
openElement (Ul _ elements) = getLast . mconcat . map Last $ openElement <$> elements
|
||||
openElement (Dl _ elements) = getLast . mconcat . map Last $ openElement <$> elements
|
||||
openElement (Div _ elements) = getLast . mconcat . map Last $ openElement <$> elements
|
||||
openElement (Ul _ elements) = openElement =<< maybeLast elements
|
||||
openElement (Dl _ elements) = openElement =<< maybeLast elements
|
||||
openElement (Div _ elements) = openElement =<< maybeLast elements
|
||||
openElement h = Just h
|
||||
|
||||
openLine :: [Line] -> Maybe Line
|
||||
|
Loading…
Reference in New Issue
Block a user