about summary refs log tree commit diff stats
path: root/trunk/versify.hs
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/versify.hs')
-rw-r--r--trunk/versify.hs15
1 files changed, 0 insertions, 15 deletions
diff --git a/trunk/versify.hs b/trunk/versify.hs deleted file mode 100644 index 48e9c00..0000000 --- a/trunk/versify.hs +++ /dev/null
@@ -1,15 +0,0 @@
1import Text.Pandoc.JSON
2import Data.List.Split
3
4main :: IO ()
5main = toJSONFilter transformVerseParas
6
7transformVerseParas :: Block -> Block
8transformVerseParas (Para xs)
9 | LineBreak `elem` xs = Para (addLineSpans xs)
10 | otherwise = Para xs
11transformVerseParas x = x
12
13addLineSpans :: [Inline] -> [Inline]
14addLineSpans = map encloseInSpan . splitWhen (== LineBreak)
15 where encloseInSpan = Span ("", ["line"], [])