diff options
Diffstat (limited to 'src/sisudoc/ocda/abstraction/doc_has.d')
| -rw-r--r-- | src/sisudoc/ocda/abstraction/doc_has.d | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/sisudoc/ocda/abstraction/doc_has.d b/src/sisudoc/ocda/abstraction/doc_has.d index ecdef25..4ecf018 100644 --- a/src/sisudoc/ocda/abstraction/doc_has.d +++ b/src/sisudoc/ocda/abstraction/doc_has.d @@ -264,8 +264,18 @@ template spineDocHasFromAbstraction() { _tag_assoc[obj.metainfo.identifier]["seg_lv4"] = obj.tags.html_segment_anchor_tag_is; } - _tag_assoc[obj.metainfo.identifier]["seg_lv1to4"] - = obj.tags.epub_segment_anchor_tag_is; + /+ ↓ An object that is not written into any segment still carries an + identifier, and can share it: a poem block and its verses have one + ocn between them, the verses are written and the block itself is not. + The block comes second, so an unguarded assignment replaced a good + segment name with an empty one, and the link came out as + ".xhtml#297". seg_lv4 above is guarded already, which is why this + showed in the epub and not in the html. + +/ + if (obj.tags.epub_segment_anchor_tag_is.length > 0) { + _tag_assoc[obj.metainfo.identifier]["seg_lv1to4"] + = obj.tags.epub_segment_anchor_tag_is; + } } } _out.imagelist = _images.sort.uniq.array; |
