1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 16:33:03 +03:00

isOnSingleLine takes a Source.

This commit is contained in:
Rob Rix 2015-12-23 22:19:29 -05:00
parent e0560d272b
commit 99b04b4038

View File

@ -103,7 +103,7 @@ spec = do
isClosedBy f (Row a@(Line _) b@(Line _)) = Maybe.isNothing (openLineBy f [ a ]) && Maybe.isNothing (openLineBy f [ b ])
isClosedBy _ (Row _ _) = False
isOnSingleLine (a, _, _) = filter (/= '\n') a == a
isOnSingleLine (Source (_, a), _, _) = filter (/= '\n') a == a
combineIntoLeaves (leaves, start) char = (leaves ++ [ Free $ Annotated (Info (Range start $ start + 1) mempty, Info (Range start $ start + 1) mempty) (Leaf [ char ]) ], start + 1)