mirror of
https://github.com/github/semantic.git
synced 2024-12-01 09:15:01 +03:00
Reformat across lines.
This commit is contained in:
parent
6075a62626
commit
da4fc09e82
@ -53,7 +53,9 @@ parserForFilepath = parserForType . T.pack . takeExtension
|
||||
breakDownLeavesByWord :: Source Char -> Term T.Text Info -> Term T.Text Info
|
||||
breakDownLeavesByWord source = cata replaceIn
|
||||
where
|
||||
replaceIn (Info range categories _) (Leaf _) | ranges <- rangesAndWordsInSource range, length ranges > 1 = Info range categories (1 + fromIntegral (length ranges)) :< Indexed (makeLeaf categories <$> ranges)
|
||||
replaceIn (Info range categories _) (Leaf _) | ranges <- rangesAndWordsInSource range
|
||||
, length ranges > 1
|
||||
= Info range categories (1 + fromIntegral (length ranges)) :< Indexed (makeLeaf categories <$> ranges)
|
||||
replaceIn info syntax = info :< syntax
|
||||
rangesAndWordsInSource range = rangesAndWordsFrom (start range) (toString $ slice range source)
|
||||
makeLeaf categories (range, substring) = Info range categories 1 :< Leaf (T.pack substring)
|
||||
|
Loading…
Reference in New Issue
Block a user