From e9853388b4c682ecf0e19d1222d75ad452039340 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 31 Jul 2020 14:40:07 +0200 Subject: crossref citations are shown unconditionally unfortunately some more regressions... --- src/cite.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/cite.cpp b/src/cite.cpp index 271e262..f9af2b4 100644 --- a/src/cite.cpp +++ b/src/cite.cpp @@ -175,28 +175,31 @@ void CitationManager::generatePage() } // search for the name citeName = ""; - if (j != -1) // to prevent something like "@manual ," and no { found + if (s != -1 && j!= -1) // to prevent something like "@manual ," and no { found { + int k=line.find(",",j); + j++; while (s != -1 && citeName.isEmpty()) { - int k=line.find(",",j); if (k != -1) { - citeName = line.mid((uint)(j+1),(uint)(k-j-1)); + citeName = line.mid((uint)(j),(uint)(k-j)); } else { - citeName = line.mid((uint)(j+1)); + citeName = line.mid((uint)(j)); } citeName = citeName.stripWhiteSpace(); - j = -1; + j = 0; if (citeName.isEmpty() && (s=input.find('\n',pos))!=-1) { line = input.mid((uint)pos,(uint)(s-pos)); pos=s+1; + k=line.find(","); } } } + //printf("citeName = #%s#\n",citeName.data()); } } } -- cgit v0.12