Rollup merge of #93217 - willcrichton:example-analyzer, r=GuillaumeGomez
Improve Rustdoc UI for scraped examples with multiline arguments, fix overflow in line numbers This PR improves a few aspects of the scrape examples feature in Rustdoc. * Only function names and not the full call expression are highlighted. * For call-sites with multiline arguments, the minimized code viewer will scroll to the top of the call-site rather than the middle if the argument is larger than the viewer size, ensuring that the function name is visible. * This fixes an issue where the line numbers column had a visible x-scroll bar. r? `@GuillaumeGomez`
This commit is contained in:
commit
db61452b7a
13 changed files with 342 additions and 88 deletions
|
|
@ -1,7 +1,6 @@
|
|||
// @has foobar/fn.ok.html '//*[@class="docblock scraped-example-list"]' 'ex2'
|
||||
// @has foobar/fn.ok.html '//*[@class="more-scraped-examples"]' 'ex1'
|
||||
// @has foobar/fn.ok.html '//*[@class="highlight focus"]' '1'
|
||||
// @has foobar/fn.ok.html '//*[@class="highlight"]' '2'
|
||||
// @has foobar/fn.ok.html '//*[@class="highlight focus"]' '0'
|
||||
// @has foobar/fn.ok.html '//*[@class="highlight focus"]' 'ok'
|
||||
// @has foobar/fn.ok.html '//*[@class="highlight"]' 'ok'
|
||||
|
||||
pub fn ok(_x: i32) {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue