GNOME Bugzilla – Bug 735145
QHP toc broken if mainpage with PROJECT_NAME title has sections/subpages
Last modified: 2014-12-25 16:03:18 UTC
Created attachment 284066 [details] minimal example that generates broken qhp If you have a markdown main page file, with anchor #mainpage, which has the same title as the PROJECT_NAME, using sections or subpages on that main page will break the QHP file - one too many "</section>" closing tags is placed in the file, making it corrupt. <toc> <section title="My Project" ref="index.html"> <section title="Table of Contents " ref="index.html#toc" /> <section title="Sub-page" ref="mysubpage.html"> <section title="Intro " ref="mysubpage.html#subintro" /> </section> </section> </section> </toc> The page itself is collapsed in the QHP toc (there's no duplicate reference to index.html, as discussed in #612854). After changing the label of the main page to something that doesn't match the PROJECT_NAME setting (e.g. "My Project Mainpage"), the generated QHP file is correct: <toc> <section title="My Project" ref="index.html"> <section title="My Project Mainpage" ref="index.html"> <section title="Table of Contents " ref="index.html#toc" /> <section title="Sub-page" ref="mysubpage.html"> <section title="Intro " ref="mysubpage.html#subintro" /> </section> </section> </section> </toc> Note how the mainpage reference is now not collapsed into the main index.html reference; instead you have the duplicate reference (again, bug #612854 also mentions this). If the main page has no sections (e.g. "\ref" instead of "\subpage", no headings with anchor definitions as "{#anchor}"), the output is also correct. This might also be related to bug #558361. *Steps to reproduce:* 1. Create a project with a markdown file as main page, set GENERATE_QHP = Yes, PROJECT_NAME to "My Project". 2. Make the first header the same as the PROJECT_NAME setting, add anchor definition {#mainpage} (i.e. "# My Project {#mainpage}" 3. Add a section to the main page (e.g. "# Introduction {#intro}") or use the "\subpage" command on the main page. 4. Generate the documentation Attached is a minimal example to demonstrate the issue.
Confirmed. Should be fixed in the next GIT update.
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.8.9. Please verify if this is indeed the case. Reopen the bug if you think it is not fixed and please include any additional information that you think can be relevant (preferrably in the form of a self-contained example).