about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/builder.rs
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-09-09 14:35:03 +1000
committerGitHub <noreply@github.com>2025-09-09 14:35:03 +1000
commit3bd603b2394a7d98426ec9263eae08a418544e92 (patch)
tree63ffd19e1192a7182af8ef0f28f3eccc4fb29e71 /compiler/rustc_codegen_llvm/src/builder.rs
parentc5a62b80587ef3c48245990ad5cd8f02518b2565 (diff)
parent8b58777968a4c663d6c1293bacff6da99e6e5203 (diff)
downloadrust-3bd603b2394a7d98426ec9263eae08a418544e92.tar.gz
rust-3bd603b2394a7d98426ec9263eae08a418544e92.zip
Rollup merge of #146195 - nixxo:urlencoding-fix, r=ehuss
fix partial urlencoded link support

Hello Rust community.
This is my first contribution, hope is useful.

While translating in Italian the rust book https://github.com/nixxo/rust-lang-book-it I noticed that the linkchecker tool was failing reporting broken links on some pages even if the link worked properly in the browser. Upon inspection I noticed that mdbook basically urlencoded the links, but not urlencoded the heading IDs resulting in a non-identical anchor/IDs pairing that linkchecker reports as non-valid.

looking at the source code for the linkchecker tool I noticed that urlencoding was done by the `small_url_encode` function in a partial way, as the name suggests. Replacing this function with a full urlencoding fixes the issue and the links are properly reported as valid.

- added full urlencoding to properly check urlencoded anchor links against non-urlencoded heading IDs
- added tests

urlecoding provided by https://crates.io/crates/urlencoding
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
0 files changed, 0 insertions, 0 deletions