You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let doc_crate_dir = doc_dir.join(crate_name.replace('-',"_"));
270
264
271
265
let bytes = fs::read(doc_dir.join("search-index.js")).unwrap();
272
-
fs::write(
273
-
doc_crate_dir.join("search-index.js"),
274
-
&bytes
275
-
)
276
-
.unwrap();
277
-
278
-
279
-
// monkeypatch search.js to remove the crate name from the path.
280
-
let js = fs::read(doc_dir.join("search.js")).unwrap();
281
-
let monkeypatch = ByteRegex::new("return\\[displayPath,href\\]").unwrap();
282
-
let js = monkeypatch.replace_all(&js,&b"href=href.slice(ROOT_PATH.length);href=ROOT_PATH+href.slice(href.indexOf('/')+1);return[displayPath,href]"[..]);
0 commit comments