[rustdoc] Fix system theme detection#63847
Conversation
There was a problem hiding this comment.
| return property.replace(/\"/g, "").replace(/\'/g, ""); | |
| return property.replace(/[\"\']/g, ""); |
There was a problem hiding this comment.
In case we change the css for whatever reason, I'd prefer to keep the replace of single quotes as well. Let's avoid surprising regressions if possible.
There was a problem hiding this comment.
Surely @bjorn3's suggestion replaces both double and single quotes, just in one .replace() call?
There was a problem hiding this comment.
Oh indeed! Completely missed it... Sorry @bjorn3...
|
I'm afraid I have no way to know for certain if this functions correctly. |
|
You can run the code of the function in your browser directly (yes, again... sorry...). You just need to ensure it returns "dark" or "light" without double quotes. |
|
@kinnison: 🔑 Insufficient privileges: Not in reviewers |
4944373 to
fcbbf8d
Compare
|
Updated with @bjorn3's suggestion. |
|
Any updates on this? Do we need to find a different reviewer since @kinnison doesn't have access? |
|
📌 Commit fcbbf8d has been approved by |
…on, r=kinnison [rustdoc] Fix system theme detection Fixes rust-lang#63830 The problem is that it returns the property "entirely" (so with the quotes in our case). Removing them fixes the issue. cc @fenhl r? @kinnison
Rollup of 7 pull requests Successful merges: - #62957 (Match the loop examples) - #63600 (Merge oli-obk mail addresses) - #63684 (Constify LinkedList new function) - #63847 ([rustdoc] Fix system theme detection) - #63999 (Add missing links on AsRef trait) - #64014 ( miri: detect too large dynamically sized objects ) - #64015 (some const-eval test tweaks) Failed merges: r? @ghost
Fixes #63830
The problem is that it returns the property "entirely" (so with the quotes in our case). Removing them fixes the issue.
cc @fenhl
r? @kinnison