Problem
A heading is a Markdown link causes the sidebar header navigation item to render as an empty anchor.
For example, a heading like:
## [fzf](https://github.com/junegunn/fzf)
can produce sidebar HTML like:
<li class="header-item expanded">
<span class="chapter-link-wrapper">
<a href="#fzf" class="header-in-summary current-header"></a>
</span>
</li>
The <a> is present, but it has no text content, so the sidebar entry appears blank.
The sidebar generates a matching anchor element for the heading, but the rendered text content is empty.
See https://sigoden.github.io/mynotes/collections/cli.html for an example.
Steps
- run
mdbook init
- modify src/chapter_1.md
# Chapter 1
## [fzf](https://github.com/junegunn/fzf)
An interactive filter program for any kind of list.
## [rg](https://github.com/BurntSushi/ripgrep)
Fast line-oriented search tool.
- run
mdbook serve
Possible Solution(s)
The sidebar header navigation should display the heading text, even if the heading is a Markdown link.
At minimum, headings with links should not produce an empty sidebar entry.
Notes
No response
Version
Problem
A heading is a Markdown link causes the sidebar header navigation item to render as an empty anchor.
For example, a heading like:
## [fzf](https://github.com/junegunn/fzf)can produce sidebar HTML like:
The
<a>is present, but it has no text content, so the sidebar entry appears blank.The sidebar generates a matching anchor element for the heading, but the rendered text content is empty.
See https://sigoden.github.io/mynotes/collections/cli.html for an example.
Steps
mdbook initmdbook servePossible Solution(s)
The sidebar header navigation should display the heading text, even if the heading is a Markdown link.
At minimum, headings with links should not produce an empty sidebar entry.
Notes
No response
Version