about summary refs log tree commit diff
path: root/src/librustdoc/html/static/js/storage.js
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-02-13 17:39:05 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2025-02-14 11:41:28 +0100
commit599f88d7717aca793e81c68e66f91b5b9be2d732 (patch)
treec112e94426d3284755a60587af688a64fcb90ed9 /src/librustdoc/html/static/js/storage.js
parent905b1bf1ccccaf091a880b069f80dc38ad9ecad3 (diff)
downloadrust-599f88d7717aca793e81c68e66f91b5b9be2d732.tar.gz
rust-599f88d7717aca793e81c68e66f91b5b9be2d732.zip
Add new setting to wrap source code lines when too long
Diffstat (limited to 'src/librustdoc/html/static/js/storage.js')
-rw-r--r--src/librustdoc/html/static/js/storage.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/js/storage.js b/src/librustdoc/html/static/js/storage.js
index 3042373fb09..4f70166848c 100644
--- a/src/librustdoc/html/static/js/storage.js
+++ b/src/librustdoc/html/static/js/storage.js
@@ -286,6 +286,9 @@ if (getSettingValue("hide-modnav") === "true") {
 if (getSettingValue("sans-serif-fonts") === "true") {
     addClass(document.documentElement, "sans-serif");
 }
+if (getSettingValue("wrap-source-code") === "true") {
+    addClass(document.documentElement, "wrap-source-code");
+}
 function updateSidebarWidth() {
     const desktopSidebarWidth = getSettingValue("desktop-sidebar-width");
     if (desktopSidebarWidth && desktopSidebarWidth !== "null") {