git.iko.soy/typeable/pandoc
on master help sign in
FB2 reader: add notes parsing test
5c7ad59Alexander Krotov
test/Tests/Readers/FB2.hs+1
@@ -36,4 +36,5 @@ tests = [ fb2Test "Emphasis" "fb2/reader/emphasis.fb2"
36 , fb2Test "Epigraph" "fb2/reader/epigraph.fb2"
36 , fb2Test "Epigraph" "fb2/reader/epigraph.fb2"
37 , fb2Test "Poem" "fb2/reader/poem.fb2"
37 , fb2Test "Poem" "fb2/reader/poem.fb2"
38 , fb2Test "Meta" "fb2/reader/meta.fb2"
38 , fb2Test "Meta" "fb2/reader/meta.fb2"
39+ , fb2Test "Notes" "fb2/reader/notes.fb2"
39 ]
40 ]
test/fb2/reader/notes.fb2new file+19
@@ -0,0 +1,19 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink">
3+ <body>
4+ <section>
5+ <p>Note <a l:href="#n1" type="note">1</a>.</p>
6+ <p>Second note <a l:href="#n2" type="note">2</a>.</p>
7+ </section>
8+ </body>
9+ <body name="notes">
10+ <section id="n1">
11+ <title><p>1</p></title>
12+ <p>Note contents</p>
13+ </section>
14+ <section id="n2">
15+ <title><p>2</p></title>
16+ <p>Second note contents.</p>
17+ </section>
18+ </body>
19+</FictionBook>
test/fb2/reader/notes.nativenew file+4
@@ -0,0 +1,4 @@
1+Pandoc (Meta {unMeta = fromList []})
2+[Div ("",["section"],[])
3+ [Para [Str "Note",Space,Note [Para [Str "Note",Space,Str "contents"]],Str "."]
4+ ,Para [Str "Second",Space,Str "note",Space,Note [Para [Str "Second",Space,Str "note",Space,Str "contents."]],Str "."]]]