googletest
googletest copied to clipboard
[Bug]: Internal section links in docs (markdown) do not work
Describe the issue
The internal section links (by heading ID) are not working (at least not in GitHub's markdown renderer).
Example: https://github.com/google/googletest/blob/5ab508a01f9eb089207ee87fd547d290da39d015/docs/reference/assertions.md?plain=1#L159-L160 contains the link for this section: https://github.com/google/googletest/blob/5ab508a01f9eb089207ee87fd547d290da39d015/docs/reference/assertions.md?plain=1#L261
https://github.com/google/googletest/blob/main/docs/reference/assertions.md#floating-point
but GitHub does not take you to the "Floating Point" section. Instead this would be the correct link:
https://github.com/google/googletest/blob/main/docs/reference/assertions.md#floating-point-comparison-floating-point
It seems that by trying to place the shorthand heading ID (#floating-point)
in the heading text itself, it has caused GitHub's .md renderer to not recognize floating-point
as the correct heading ID.
There are many headings and links that have this same issue in this file, and this may affect other files too, if they follow the same heading format.
Steps to reproduce the problem
- Navigate to this page (linked in the binary comparison section of the Assertions reference doc).
or click here: https://github.com/google/googletest/blob/main/docs/reference/assertions.md#floating-pointhttps://github.com/google/googletest/blob/main/docs/reference/assertions.md#floating-point
- Observe that the floating point section is not opened.
- Navigate to this page (proposed link correction).
or click here: https://github.com/google/googletest/blob/main/docs/reference/assertions.md#floating-point-comparison-floating-pointhttps://github.com/google/googletest/blob/main/docs/reference/assertions.md#floating-point-comparison-floating-point
- Observe that the floating point section is now opened.
What version of GoogleTest are you using?
N/A
What operating system and version are you using?
N/A
What compiler and version are you using?
N/A
What build system are you using?
N/A
Additional context
No response
See https://github.com/google/googletest/blob/main/README.md#documentation-updates
Our documentation is now live on GitHub Pages at https://google.github.io/googletest/. We recommend browsing the documentation on GitHub Pages rather than directly in the repository.
In https://google.github.io/googletest/reference/assertions.html#binary-comparison the link appears to work fine.