rust-lang / rust-lang/mdBook

Warnings when using an include within an admonition

Open
#2,941 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug
Dominant language
Rust
Stars
22.2k
Forks
1.9k
PR merge metrics
PR metrics pending

Description

Problem

The following causes warnings but renders correctly:

> [!TIP]
> <details><summary>Click to open</summary>{{#include assets/tables/any_exp.html}}</details>
 WARN unclosed HTML tag `<details>` found in `zoktai/any.md` while exiting BlockQuote(Some(Tip))
HTML tags must be closed before exiting a markdown element.
 WARN unexpected HTML end tag `</details>` found in `zoktai/any.md`
Check that the HTML tags are properly balanced.
Image

All tags are properly closed but are not detected as such, replacing the include with plain text resolves the warnings.

Version
mdBook 0.5.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the warning with zoktai/any.md, assets/tables/any_exp.html, and the shown admonition/include snippet under mdBook 0.5.0. Trace include handling and HTML-tag validation first; done means the example renders without the unclosed or unexpected tag warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.