1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 18:23:44 +03:00

EmptyLines are not closed.

This commit is contained in:
Rob Rix 2015-12-18 13:19:05 -05:00
parent 8bb258a8e6
commit c02bd6e11a

View File

@ -178,4 +178,5 @@ spec = do
offsetAnnotated by1 by2 (Annotated (left, right) syntax) = Annotated (offsetInfo by1 left, offsetInfo by2 right) syntax
span = Span (Just "category-leaf")
isOpen (Row a b) = (maybe False (const True) $ openLine [ a ]) && (maybe False (const True) $ openLine [ b ])
isClosed (Row a b) = (maybe True (const False) $ openLine [ a ]) && (maybe True (const False) $ openLine [ b ])
isClosed (Row a@(Line _ _) b@(Line _ _)) = (maybe True (const False) $ openLine [ a ]) && (maybe True (const False) $ openLine [ b ])
isClosed (Row _ _) = False