Skip to content
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

Links aren't properly rendered when preceded by quoted text #8525

Closed
gsrohde opened this issue Apr 29, 2021 · 4 comments
Closed

Links aren't properly rendered when preceded by quoted text #8525

gsrohde opened this issue Apr 29, 2021 · 4 comments
Labels

Comments

@gsrohde
Copy link

gsrohde commented Apr 29, 2021

Describe the bug
When some double-quoted text that extends over three or more lines is immediately followed by a link, the link isn't rendered properly.

Expected behavior
A link of the form [link text](linkurl.com) should generate HTML of the form <a href="linkurl.com">link text</a>. Instead I am seeing &lt;a href="linkurl.com"&gt;link text, that is, the opening HTML tag delimiters are escaped, and the closing tag is missing.

To Reproduce
Make a Doxyfile with this content:

# Doxyfile 1.9.1

EXTRACT_ALL            = YES
INPUT                  = my_function.cpp

and a source file my_function.cpp in the same directory with this content:

/**
 *  \brief my_function returns a double.
 *
 *  References
 *
 *  "A two line quotation followed by
 *   a reference"
 *   [See an example](example.com)
 *
 *  "A three line quotation
 *   followed by
 *   a reference"
 *   [See an example](example.com)
 *
 *  "A three line quotation
 *   followed by a line of text and then
 *   a reference"
 *   This works.
 *   [See an example](example.com)
 *
 *  The same references, but using reference links rather than inline
 *  links:
 *
 * [link name]: example.com
 *
 *
 *  "A two line quotation followed by
 *   a reference"
 *   [See an example][link name]
 *
 *  "A three line quotation
 *   followed by
 *   a reference"
 *   [See an example][link name]
 *
 *  "A three line quotation
 *   followed by a line of text and then
 *   a reference"
 *   This works.
 *   [See an example][link name]
 *
 */
double my_function() {
    return 1.234;
}

Run doxygen in the directory containing these files and open the generated HTML file (my__function_8cpp.html on my system).

The portion of the generated HTML corresponding to the references looks like this:

<p>my_function returns a double. </p>
<p>References</p>
<p>"A two line quotation followed by
  a reference" <a href="example.com">See an example</a></p>
<p>"A three line quotation followed by a reference"
  &lt;a href="example.com"&gt;See an example</p>
<p>"A three line quotation followed by a line of text and then a reference" This works. <a href="example.com">See an example</a></p>
<p>The same references, but using reference links rather than inline links:</p>
<p>"A two line quotation followed by
  a reference" <a href="example.com">See an example</a></p>
<p>"A three line quotation followed by a reference"
  &lt;a href="example.com"&gt;See an example</p>
<p>"A three line quotation followed by a line of text and then a reference" This works. <a href="example.com">See an example</a> </p>

The generated PDF file suffers from similar problems.

Version
I used Doxygen version 1.9.1 on a Mac (macOS 10.14.6); it was installed from the DMG file.

albert-github added a commit to albert-github/doxygen that referenced this issue Apr 30, 2021
…oted text

2 or more returns inside a quoted text were not handled properly, added a repeat count.
@albert-github
Copy link
Collaborator

I've just pushed a proposed patch, pull request #8527

doxygen added a commit that referenced this issue Apr 30, 2021
issue #8525 Links aren't properly rendered when preceded by quoted text
@albert-github
Copy link
Collaborator

Code has been integrated in master on github (please don't close the issue as this will be done at the moment of an official release).

@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Jun 1, 2021
@doxygen
Copy link
Owner

doxygen commented Aug 18, 2021

This issue was previously marked 'fixed but not released',
which means it should be fixed in doxygen version 1.9.2.
Please verify if this is indeed the case. Reopen the
issue if you think it is not fixed and please include any additional information
that you think can be relevant (preferably in the form of a self-contained example).

@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Aug 18, 2021
@doxygen doxygen closed this as completed Aug 18, 2021
@gsrohde
Copy link
Author

gsrohde commented Aug 19, 2021

Yes, this seems to be fixed in version 1.9.2, at least for the HTML docs. (I had trouble building the LaTeX PDF—probably due to a problem with my LaTeX installation and not anything in this release.)

I used Doxygen version 1.9.2 on a Mac (macOS 10.15.7); it was installed from the DMG file.

albert-github added a commit to albert-github/doxygen that referenced this issue Dec 22, 2021
When having something like:
~~~
Title aa

"Pre\"B\"Post"

```
  "G"
```
~~~
we get the warning:
```
aa.md:7: warning: unexpected command endcode
```

this looks like to be introduced in version 1.9.2 and a regression regarding:
```
Commit: 2683d17 [2683d17]
Date: Friday, April 30, 2021 12:26:12 PM
issue doxygen#8525 Links aren't properly rendered when preceded by quoted text

2 or more returns inside a quoted text were not handled properly, added a repeat count.
```
Note that the output originally was not ok either (missing some backslashes).
Note checked doxygen#8525 again as well, looks OK.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants