From a2e30e57062cb6e826bbb87dec3db433fcc20260 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 11 Jan 2019 19:13:28 +0100 Subject: Invalid id possible with tooltips In case a filename starts with a number the `id` also starts with a number and this is not allowed in XHTML and results in the message: `Syntax of value for attribute id of div is not valid` on other places it has been solved by placing an `a` as first character, this is done here as well but also needs to be don in the transformation from reference to tooltip id (htmlgen.cpp) --- src/htmlgen.cpp | 2 +- src/tooltip.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index efd2108..b8fc5a2 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -769,7 +769,7 @@ void HtmlGenerator::init() t << endl << "$(document).ready(function() {\n" " $('.code,.codeRef').each(function() {\n" - " $(this).data('powertip',$('#'+$(this).attr('href').replace(/.*\\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html());\n" + " $(this).data('powertip',$('#a'+$(this).attr('href').replace(/.*\\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html());\n" " $(this).powerTip({ placement: 's', smartPlacement: true, mouseOnToPopup: true });\n" " });\n" "});\n"; diff --git a/src/tooltip.cpp b/src/tooltip.cpp index 3b128a9..91da583 100644 --- a/src/tooltip.cpp +++ b/src/tooltip.cpp @@ -84,6 +84,7 @@ void TooltipManager::addTooltip(Definition *d) { id+="_"+anc; } + id = "a" + id; if (p->tooltipInfo.find(id)==0) { p->tooltipInfo.insert(id,d); -- cgit v0.12 From 0f1e5fad06a66bf747e5cb1526be56c747558a79 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 11 Jan 2019 20:20:34 +0100 Subject: Terminate brief in case of `-#` list With the list types `-`, `*` and `1.` the brief description is terminated, with the `-#` lists this was not the case. --- src/commentscan.l | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/commentscan.l b/src/commentscan.l index 7fab755..c656c9e 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -1282,6 +1282,11 @@ RCSTAG "$"{ID}":"[^\n$]+"$" addOutput(insidePre || Doxygen::markdownSupport ? yytext : "–"); } "-#"{B}+ { // numbered item + if (inContext!=OutputXRef) + { + briefEndsAtDot=FALSE; + setOutput(OutputDoc); + } addOutput(yytext); } ("."+)[a-z_A-Z0-9\)] { // . at start or in the middle of a word, or ellipsis -- cgit v0.12 From db8ab6a544e45f99e0ab4103a89a5f05dbde92b7 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 11 Jan 2019 20:21:56 +0100 Subject: Terminate brief in case of `-#` list Test case. --- testing/081/081__brief__lists_8h.xml | 121 +++++++++++++++++++++++++++++++++++ testing/081_brief_lists.h | 23 +++++++ 2 files changed, 144 insertions(+) create mode 100755 testing/081/081__brief__lists_8h.xml create mode 100755 testing/081_brief_lists.h diff --git a/testing/081/081__brief__lists_8h.xml b/testing/081/081__brief__lists_8h.xml new file mode 100755 index 0000000..5ede1fb --- /dev/null +++ b/testing/081/081__brief__lists_8h.xml @@ -0,0 +1,121 @@ + + + + 081_brief_lists.h + + + void + void c_subr1 + (void) + c_subr1 + + void + + + Just with minus. + + + + + + Item 1 + + + Item 2 + + + + + + + + + + void + void c_subr2 + (void) + c_subr2 + + void + + + With minus and hash. + + + + + + Item 3 + + + Item 4 + + + + + + + + + + void + void c_subr3 + (void) + c_subr3 + + void + + + With numbers. + + + + + + Item 5 + + + Item 6 + + + + + + + + + + void + void c_subr4 + (void) + c_subr4 + + void + + + With asterisk. + + + + + + Item 7 + + + Item 8 + + + + + + + + + + + + + + + + diff --git a/testing/081_brief_lists.h b/testing/081_brief_lists.h new file mode 100755 index 0000000..8d13a93 --- /dev/null +++ b/testing/081_brief_lists.h @@ -0,0 +1,23 @@ +// objective: Test termination of brief description with lists +// check: 081__brief__lists_8h.xml +/// \file + +/// @brief Just with minus +/// - Item 1 +/// - Item 2 +void c_subr1(void); + +/// @brief With minus and hash +/// -# Item 3 +/// -# Item 4 +void c_subr2(void); + +/// @brief With numbers +/// 1. Item 5 +/// 2. Item 6 +void c_subr3(void); + +/// @brief With asterisk +/// * Item 7 +/// * Item 8 +void c_subr4(void); -- cgit v0.12