about summary refs log tree commit diff
path: root/src/librustdoc/html/static
AgeCommit message (Collapse)AuthorLines
2025-03-24search.js: fix signature of pushTextbinarycat-9/+5
2025-03-24search.js: refactor transformResultsbinarycat-14/+27
2025-03-24search.js: remove another Map.has() and @ts-expect-errorbinarycat-3/+3
2025-03-24search.js(query parser): rethrow error if it isn't a string arraybinarycat-3/+7
only errors that are string arrays are intended to be shown to the user, other errors are bugs, and will be shown in the console as usual.
2025-03-24search.js: add undef2null and eliminate more @ts-expect-errorbinarycat-10/+21
2025-03-24search.js: refactor handling of rawPaths in buildIndexbinarycat-20/+22
2025-03-24search.js: improve typechecking by avoiding Map.hasbinarycat-13/+8
2025-03-24rustdoc js: add nonundef and use it to remove a ts-expect-errorbinarycat-5/+28
2025-03-14rustdoc js: add nonnull helper and typecheck src-script.jsbinarycat-9/+70
2025-03-10main.js: remove searchState from globals.binarycat-1/+1
2025-03-10main.js: typecheck things related to window.register_type_implsbinarycat-8/+10
2025-03-10rustdoc.d.ts: add window.{register_implementors,pending_implementors}binarycat-3/+17
2025-03-10rustdoc.d.ts: window.SIDEBAR_ITEMS may exist.binarycat-1/+2
2025-03-10main.js: handle document.activeElement being nullbinarycat-2/+2
this is technically possible if someone sticks rustdoc in an iframe, i think?
2025-03-10main.js(isDisplayed): coerce truthy values to booleanbinarycat-3/+2
2025-03-10main.js: always refer to searchState through window.searchStatebinarycat-10/+5
2025-03-10main.js: handleEscape and handleShortcut accept KeyboardEventbinarycat-2/+6
2025-03-10main.js: give type signatures to a few helper functionsbinarycat-4/+8
2025-03-10main.js: don't set mouseMovedAfterSearch, as it is never readbinarycat-1/+0
2025-03-10main.js: insertAfter needs non-root referenceNodebinarycat-4/+1
2025-03-04Rollup merge of #137981 - lolbinarycat:rustdoc-js-less-expect-error, r=notriddleJubilee-45/+41
rustdoc search: increase strictness of typechecking r? `@notriddle` The signature of `makePrimitiveElement` is now more accurate. I believe the intent of the code is that `name` cannot be null if `bindingName.name` is null, and I believe typescript is expressive enough to encode this, but I'm not quite sure how, or if this would be desirable. I'm also introducing mapped types into `rustdoc.d.ts`, but I think it's worth it in order to avoid keeping two interfaces in sync. I may add more commits onto this to remove more ``@ts-expect-error`` instances.
2025-03-04search.js: remove incorrect outdated commentbinarycat-2/+0
2025-03-04search.js: give RawSearchIndexCrate.a an index signaturebinarycat-4/+2
2025-03-04search.js: allow empty result arraysbinarycat-4/+3
2025-03-04search.js: give buildIndex a proper return typebinarycat-2/+5
some of the fields of rustdoc.Row were confusing null and undefined.
2025-03-04search.js: give local `where` a typebinarycat-2/+1
2025-03-04give local mgens a typebinarycat-2/+1
2025-03-04search.js: give pathSplitter a type signaturebinarycat-1/+5
2025-03-04search.js: second argument of convertNameToId is optionalbinarycat-2/+1
2025-03-04search.js: local variable `extra` is an array, annotate it as such.binarycat-2/+2
2025-03-04don't use double quotesbinarycat-1/+1
2025-03-04fix whitespacebinarycat-6/+6
2025-03-04ParserQueryElement.typeFilter MAY be a string, OR number.binarycat-4/+2
ideally we would encode that it is a string before convertTypeFilterOnElem is called, and a number after, but i'm not sure that's possible without significant refactoring.
2025-03-04rustdoc search: give buildTypeMapIndex a conditional return typebinarycat-16/+10
we encode "if the argument is a non-empty string, this will never return null" into the type signature.
2025-03-03rustdoc search: increase strictness of typecheckingbinarycat-6/+11
2025-02-25Update information about NanumBarunGothicColin Pitrat-1/+11
2025-02-25Complete the list of resources used in rustdoc outputColin Pitrat-0/+11
2025-02-24Rollup merge of #136991 - GuillaumeGomez:code-wrapping, r=notriddleJacob Pratt-61/+99
[rustdoc] Add new setting to wrap source code lines when too long Fixes https://github.com/rust-lang/rust/issues/127334. Wrapped lines look like this: ![image](https://github.com/user-attachments/assets/92006a27-ed1e-4beb-91f2-f453b72c5e1a) It works in both source code pages and doc pages. You can test it [here](https://rustdoc.crud.net/imperio/code-wrapping/bar/index.html). r? ``@notriddle``
2025-02-22Rename feature into `Word wrap source code`Guillaume Gomez-20/+20
2025-02-15Rollup merge of #137068 - tapanprakasht:fix-copy-item-path, r=aDotInTheVoidMatthias Krüger-1/+4
fix(rustdoc): Fixed `Copy Item Path` in rust doc This PR aims to address the issue reported by https://github.com/rust-lang/rust/issues/137048 Issue caused by previous changes for removing `@ts-expect-error` by this change https://github.com/rust-lang/rust/commit/2ea95f867012e91fa742e60b7b6424abf86c05cf
2025-02-15fix(rustdoc): Fixed `Copy Item Path` in rust docTapan Prakash-1/+4
2025-02-15rustdoc: Properly restore search input placeholderLeón Orell Valerian Liehr-2/+3
2025-02-14Add new setting to wrap source code lines when too longGuillaume Gomez-61/+99
2025-02-12rustdoc: use better, consistent SVG icons for scraped examplesMichael Howell-5/+50
This continues two ongoing projects: - Replacing ascii art with real icons that don't look like syntax, are understandable to people who're familiar with desktop computers and smart devices, and aren't ugly. - Using labels and tooltips to clarify these icons, when the limits of popular iconography hit us. In this case, I've added tooltips, because, unfortunately, there's not room for always-visible labels.
2025-02-11Correctly handle `user-select: none`Guillaume Gomez-0/+5
2025-02-10Move line numbers into the `<code>` directlyGuillaume Gomez-28/+48
2025-02-05Rollup merge of #136263 - notriddle:notriddle/typescript2, r=fmeaseLeón Orell Valerian Liehr-148/+156
rustdoc: clean up a bunch of ts-expected-error declarations in main This mostly consists of handling potentially-null input and adding more global functions to the list of globals. Follow-up for #136161
2025-02-04Rollup merge of #134807 - poliorcetics:ab/push-skpynvsmwkll, r=camelidMatthias Krüger-12/+13
fix(rustdoc): always use a channel when linking to doc.rust-lang.org Closes #131971 I manually checked the resulting links One issue is that this will create `nightly/...` links in places that formerly linked to stable, is that ok ? (the `slice` and `array` links in the search help notably)
2025-02-03rustdoc: clean up a bunch of ts-expected-error declarations in mainMichael Howell-148/+156
This mostly consists of handling potentially-null input and adding more global functions to the list of globals.
2025-01-30fix(rustdoc): always use a channel when linking to doc.rust-lang.orgAlexis (Poliorcetics) Bourget-12/+13