diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-13 06:41:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-13 06:41:25 +0100 |
| commit | 62e9e46937895e56571957151dce6d865f90f147 (patch) | |
| tree | d37c48b4f00c74077360fe6efb2262bdc42e0888 /compiler/rustc_pattern_analysis/src/rustc.rs | |
| parent | 1ffa5ded58aca5482c0763dd202fa6c202bd1eb9 (diff) | |
| parent | f3b348bf969d40a95838d7eec20b010a64ccf6e0 (diff) | |
| download | rust-62e9e46937895e56571957151dce6d865f90f147.tar.gz rust-62e9e46937895e56571957151dce6d865f90f147.zip | |
Rollup merge of #122410 - rjeli:rustdoc-no-local-font-preload, r=notriddle
rustdoc: do not preload fonts when browsing locally
First PR, please let me know if I'm doing anything wrong.
As noted in #98769, currently `cargo doc --open` on macOS/Safari (17.2.1) doesn't load fonts due to a CORS issue. (webkit issue [here](https://bugs.webkit.org/show_bug.cgi?id=249887)). This patch moves the font preloads inside a js if statement as suggested in the GitHub issue.
I tried something more elegant with iterating over a tera array of fonts, but ran into issues, so here's the dumb fix. Only thing to note is that the font path is interpolated into a template string, so HTML escaping works fine, but it will break if there's a backtick or `${` in the font path. Not sure if this is a big deal.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/rustc.rs')
0 files changed, 0 insertions, 0 deletions
