From 2e03d23d0385dbbe39f5b6a67ab480734f285e76 Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 31 Oct 2018 13:42:58 +0100 Subject: Multiple `\xreflist` in one page with same key In case there are multiple `\xreflist` commands with the same key only the first item has a correct linking possibility, the subsequent items don't have it. Resulting in warnings in e.g. docbook and LaTeX output --- src/reflist.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/reflist.cpp b/src/reflist.cpp index e551743..c48ba23 100644 --- a/src/reflist.cpp +++ b/src/reflist.cpp @@ -148,8 +148,6 @@ void RefList::generatePage() for (it.toFirst();(item=it.current());++it) { doc += "
"; - doc += "\\anchor "; - doc += item->listAnchor; doc += "\n"; if (item->scope) { @@ -174,13 +172,18 @@ void RefList::generatePage() // escape \'s in argument list (see issue #6533) doc += substitute(substitute(item->args,"@","@@"),"\\","\\\\"); } - doc += "
"; + doc += "
\\anchor "; + doc += item->listAnchor; + doc += " "; doc += item->text; QListIterator li(item->extraItems); RefItem *extraItem; for (li.toFirst();(extraItem=li.current());++li) { - doc += "

" + extraItem->text; + doc += "

\\anchor "; + doc += extraItem->listAnchor; + doc += " "; + doc += extraItem->text; } doc += "

"; } -- cgit v0.12