From df0ea858eda69bfaae0be4c09374f5105a93a76b Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Tue, 27 Oct 2020 00:49:26 +0100 Subject: [PATCH] DocBook: use the same normalisation for biblio IDs and their references. --- development/autotests/invertedTests | 5 ++++- src/output_docbook.cpp | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/development/autotests/invertedTests b/development/autotests/invertedTests index 263d90f14b..ed107c6881 100644 --- a/development/autotests/invertedTests +++ b/development/autotests/invertedTests @@ -417,6 +417,9 @@ export/export/latex/textcyr-textgreek-test_docbook5 export/examples/.*/Graphics_and_Insets/XY-Figure_docbook5 # - Formula in tags. export/examples/.*/Graphics_and_Insets/XY-Pic_docbook5 +export/examples/.*/Graphics_and_Insets/XY-Figure_docbook5 +# - Formula in tags. +export/examples/.*/Graphics_and_Insets/XY-Pic_docbook5 # - Math macros not implemented. export/mathmacros/testcases_speed_docbook5 export/mathmacros/testcases_environments_docbook5 @@ -445,5 +448,5 @@ export/templates/Posters/.*_docbook5 Sublabel: docbook beamer # Beamer is not yet implemented. export/examples/Presentations/.*_docbook5 -export/templates/Presentations/.*_docbook5 export/templates/.*/Presentations/Beamer_docbook5 +export/templates/Presentations/.*_docbook5 diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp index 74904e1af3..e9bd621898 100644 --- a/src/output_docbook.cpp +++ b/src/output_docbook.cpp @@ -376,7 +376,8 @@ void makeBibliography( if (!ip) continue; if (const auto * bibitem = dynamic_cast(ip)) { - attr = from_utf8("xml:id='") + bibitem->getParam("key") + from_utf8("'"); + auto id = xml::cleanID(bibitem->getParam("key")); + attr = from_utf8("xml:id='") + id + from_utf8("'"); break; } } -- 2.39.2