about summary refs log tree commit diff
path: root/src/librustdoc/html/static/js
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev+love@gmail.com>2022-12-06 12:48:50 +0900
committerGitHub <noreply@github.com>2022-12-06 12:48:50 +0900
commit532fe7b8e043115477e33ad0d97dfe9469a2c236 (patch)
treea402973ea173ff2d1ffa97bc159cd764102b08ee /src/librustdoc/html/static/js
parent226202d9026b0f24b4f7aad4de398bd8378774cd (diff)
parentf7a705929aa3f40ff5c3b1e569858a7030b2e3bd (diff)
downloadrust-532fe7b8e043115477e33ad0d97dfe9469a2c236.tar.gz
rust-532fe7b8e043115477e33ad0d97dfe9469a2c236.zip
Rollup merge of #104967 - willcrichton:fix-scrape-examples, r=notriddle
Fix UI issues with Rustdoc scrape-examples feature.

A few regressions have been introduced into scrape-examples in the last few months. This commit fixes those regressions:
* Help file was being loaded from the wrong place (introduced in f9e1f6ffdf03ec33cb29e20c88fc7bcc938c7f42).
* CSS selector in JS has a typo (introduced in 14897180ae6a0506a5ad0a9f6a30ae1f75916179).
* Line numbers in scraped example code snippets are overflowing (not sure if this was ever fixed). Changing from flexbox to grid display fixed this issue.
Diffstat (limited to 'src/librustdoc/html/static/js')
-rw-r--r--src/librustdoc/html/static/js/scrape-examples.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/js/scrape-examples.js b/src/librustdoc/html/static/js/scrape-examples.js
index d0fd115fd15..e328e656edd 100644
--- a/src/librustdoc/html/static/js/scrape-examples.js
+++ b/src/librustdoc/html/static/js/scrape-examples.js
@@ -57,7 +57,7 @@
                     });
                 });
 
-            example.querySelector("next")
+            example.querySelector(".next")
                 .addEventListener("click", () => {
                     onChangeLoc(() => {
                         locIndex = (locIndex + 1) % locs.length;