FB2 reader: add notes parsing test
This commit is contained in:
parent
c1d9cf7daf
commit
5c7ad59ffe
3 changed files with 24 additions and 0 deletions
|
@ -36,4 +36,5 @@ tests = [ fb2Test "Emphasis" "fb2/reader/emphasis.fb2"
|
|||
, fb2Test "Epigraph" "fb2/reader/epigraph.fb2"
|
||||
, fb2Test "Poem" "fb2/reader/poem.fb2"
|
||||
, fb2Test "Meta" "fb2/reader/meta.fb2"
|
||||
, fb2Test "Notes" "fb2/reader/notes.fb2"
|
||||
]
|
||||
|
|
19
test/fb2/reader/notes.fb2
Normal file
19
test/fb2/reader/notes.fb2
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink">
|
||||
<body>
|
||||
<section>
|
||||
<p>Note <a l:href="#n1" type="note">1</a>.</p>
|
||||
<p>Second note <a l:href="#n2" type="note">2</a>.</p>
|
||||
</section>
|
||||
</body>
|
||||
<body name="notes">
|
||||
<section id="n1">
|
||||
<title><p>1</p></title>
|
||||
<p>Note contents</p>
|
||||
</section>
|
||||
<section id="n2">
|
||||
<title><p>2</p></title>
|
||||
<p>Second note contents.</p>
|
||||
</section>
|
||||
</body>
|
||||
</FictionBook>
|
4
test/fb2/reader/notes.native
Normal file
4
test/fb2/reader/notes.native
Normal file
|
@ -0,0 +1,4 @@
|
|||
Pandoc (Meta {unMeta = fromList []})
|
||||
[Div ("",["section"],[])
|
||||
[Para [Str "Note",Space,Note [Para [Str "Note",Space,Str "contents"]],Str "."]
|
||||
,Para [Str "Second",Space,Str "note",Space,Note [Para [Str "Second",Space,Str "note",Space,Str "contents."]],Str "."]]]
|
Loading…
Reference in a new issue