Commit 49dacd71 authored by md9ms's avatar md9ms
Browse files

Allow .:s to be used to preserve indentation

parent 349d3088
...@@ -310,8 +310,8 @@ splitStanzas = map merge . groupStanzas . filter validLine . zip [1..] . lines ...@@ -310,8 +310,8 @@ splitStanzas = map merge . groupStanzas . filter validLine . zip [1..] . lines
groupStanzas xs = let (ys,zs) = break allSpaces xs groupStanzas xs = let (ys,zs) = break allSpaces xs
in ys : groupStanzas (dropWhile allSpaces zs) in ys : groupStanzas (dropWhile allSpaces zs)
merge ((n,x):(_,' ':s):ys) = case dropWhile isSpace s of merge ((n,x):(_,' ':s):ys) = case dropWhile isSpace s of
"." -> merge ((n,x++"\n"):ys) ('.':s') -> merge ((n,x++"\n"++s'):ys)
s' -> merge ((n,x++"\n"++s'):ys) s' -> merge ((n,x++"\n"++s'):ys)
merge ((n,x):ys) = brk n x : merge ys merge ((n,x):ys) = brk n x : merge ys
merge [] = [] merge [] = []
brk n xs = case break (==':') xs of brk n xs = case break (==':') xs of
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment