From Middleman to DocPad

This commit is contained in:
Vit Brunner
2013-06-12 23:32:55 +01:00
parent ff0bd79c53
commit 941f63483d
24 changed files with 67 additions and 166 deletions
@@ -0,0 +1,16 @@
angular.module("sideBySide").factory("jsonReader", () ->
return (source) ->
parsed = eval('(' + source + ')')
new_content = []
for verse in parsed.content
if typeof(verse) == "string"
new_content.push({ section: "", text: verse })
else
if "section" not of verse
verse.section = ""
new_content.push(verse)
parsed.content = new_content
return parsed
)