endIndex simplified
This commit is contained in:
parent
ebf4dafaf3
commit
55d002a4e7
1 changed files with 1 additions and 1 deletions
|
@ -206,7 +206,7 @@ getWrite :: Int -> String -> Maybe (String, Slice, Bool)
|
||||||
getWrite offset s = ((Tdfa.matchOnceText §~ "^(\\**[[:word:]]+)[[:blank:]]*=") s) >>= matchToA
|
getWrite offset s = ((Tdfa.matchOnceText §~ "^(\\**[[:word:]]+)[[:blank:]]*=") s) >>= matchToA
|
||||||
where matchToA (before, match, after) =
|
where matchToA (before, match, after) =
|
||||||
let m = match ! 1 -- extract the match group (0 = the whole match)
|
let m = match ! 1 -- extract the match group (0 = the whole match)
|
||||||
in Just (fst m, (offset+(fst (snd m)), offset+(fst (snd m))+(snd (snd m))), False)
|
in Just (fst m, (offset+(fst (snd m)), offset+(length (fst m))), False)
|
||||||
|
|
||||||
enterBlock :: [(String,Slice,Bool)] -> [(String,Slice,Bool)]
|
enterBlock :: [(String,Slice,Bool)] -> [(String,Slice,Bool)]
|
||||||
enterBlock = map (\(v,s,b) -> ('*':v,s,b))
|
enterBlock = map (\(v,s,b) -> ('*':v,s,b))
|
||||||
|
|
Loading…
Reference in a new issue