Commit fcb4aa8a authored by Magdalena Turska's avatar Magdalena Turska

add previously omitted part of the fix for #209

parent 175f814f
......@@ -115,6 +115,12 @@ declare function nav:get-content($config as map(*), $div as element()) {
if ($nextPage) then
($div/ancestor::* intersect $nextPage/ancestor::*)[last()]
else
(: if there's only one pb in the document, it's whole
text part should be returned :)
if (count($div/ancestor::tei:text//tei:pb) = 1) then
($div/ancestor::tei:text)
else
($div/ancestor::tei:div, $div/ancestor::tei:text)[1]
)
return
$chunk
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment