summary refs log tree commit diff stats
path: root/trunk
diff options
context:
space:
mode:
Diffstat (limited to 'trunk')
-rw-r--r--trunk/versify.exebin0 -> 13686106 bytes
-rw-r--r--trunk/versify.hibin0 -> 2421 bytes
-rw-r--r--trunk/versify.hs15
-rw-r--r--trunk/versify.obin0 -> 5209 bytes
4 files changed, 15 insertions, 0 deletions
diff --git a/trunk/versify.exe b/trunk/versify.exe new file mode 100644 index 0000000..59850a2 --- /dev/null +++ b/trunk/versify.exe
Binary files differ
diff --git a/trunk/versify.hi b/trunk/versify.hi new file mode 100644 index 0000000..43853bd --- /dev/null +++ b/trunk/versify.hi
Binary files differ
diff --git a/trunk/versify.hs b/trunk/versify.hs new file mode 100644 index 0000000..def041c --- /dev/null +++ b/trunk/versify.hs
@@ -0,0 +1,15 @@
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"], [])
diff --git a/trunk/versify.o b/trunk/versify.o new file mode 100644 index 0000000..4fb1421 --- /dev/null +++ b/trunk/versify.o
Binary files differ