mirror of
https://github.com/github/semantic.git
synced 2024-12-19 12:51:52 +03:00
textElements calls out to elementAndBreak.
This commit is contained in:
parent
43a20d00bd
commit
6d2a89b55a
@ -173,11 +173,8 @@ elementAndBreak constructor x | '\n' <- last x = [ constructor $ init x, Break ]
|
||||
elementAndBreak constructor x = [ constructor x ]
|
||||
|
||||
textElements :: Range -> String -> [HTML]
|
||||
textElements range source = textAndBreak =<< actualLines s
|
||||
textElements range source = (elementAndBreak Text) =<< actualLines s
|
||||
where s = substring range source
|
||||
textAndBreak "" = []
|
||||
textAndBreak x | '\n' <- last x = [ Text $ init x, Break ]
|
||||
textAndBreak x = [ Text x ]
|
||||
|
||||
starts :: (Range , Range) -> (Int, Int)
|
||||
starts (left, right) = (start left, start right)
|
||||
|
Loading…
Reference in New Issue
Block a user