New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QHP toc broken if mainpage with PROJECT_NAME title has sections/subpages (Origin: bugzilla #735145) #5554

Closed
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component general for ---
Reported in version 1.8.7-GIT on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2014-08-21 09:18:22 +0000, Haffmans wrote:

Created attachment 284066
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 "" 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>

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.

On 2014-08-24 18:32:16 +0000, Dimitri van Heesch wrote:

Confirmed. Should be fixed in the next GIT update.

On 2014-12-25 16:03:18 +0000, Dimitri van Heesch wrote:

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).

@doxygen doxygen closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment