EmbarkStudios / cargo-about

📜 Cargo plugin to generate list of all licenses for a crate 🦀
http://embark.rs
Apache License 2.0
545 stars 32 forks source link

Multiple identical IDs in generated HTML #250

Closed Jayman2000 closed 3 months ago

Jayman2000 commented 4 months ago

Describe the bug The about.hbs file in this repo causes invalid HTML to be generated. Specifically, it causes cargo-about generate to create multiple elements with the same ID.

To Reproduce Steps to reproduce the behavior:

  1. cd into a clone of the cargo-about repo.
  2. Run cargo run -- generate --output-file test.html about.hbs
  3. Open test.html in a text editor and inspect the results. Notice how there’s multiple elements with id="Apache-2.0".

Expected behavior test.html should contain valid HTML. Specifically, it should not contain more than one element with the same ID.

Screenshots

Device:

Additional context Here’s the part of the HTML Standard that forbids multiple identical IDs:

When specified on HTML elements, the id attribute value must be unique amongst all the IDs in the element's tree and must contain at least one character.