File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,11 @@ fn pack_config(crate_name: &str) -> PackConfig {
2424
2525 // Remove srclinks that point to a file starting with `_`.
2626 let re_remove_hidden_src =
27- ByteRegex :: new ( "<a class=\" srclink[a-zA-Z0-9 ]*\" href=\" [^\" ]*/_[^\" ]*\" >source</a>" )
28- . unwrap ( ) ;
27+ ByteRegex :: new ( "<a class=\" src\" href=\" [^\" ]*/_[^\" ]*\" >source</a>" ) . unwrap ( ) ;
2928
3029 // Rewrite srclinks from `../../crate_name/foo" to "/__DOCSERVER_SRCLINK/foo".
3130 let re_rewrite_src = ByteRegex :: new ( & format ! (
32- "<a class=\" srclink([a-zA-Z0-9 ]*) \" href=\" (\\ .\\ ./)+src/{}" ,
31+ "<a class=\" src \" href=\" (\\ .\\ ./)+src/{}" ,
3332 & crate_name
3433 ) )
3534 . unwrap ( ) ;
@@ -67,10 +66,7 @@ fn pack_config(crate_name: &str) -> PackConfig {
6766 )
6867 . into_owned ( ) ;
6968 let res = re_rewrite_src
70- . replace_all (
71- & res,
72- & b"<a class=\" srclink$1\" href=\" /__DOCSERVER_SRCLINK" [ ..] ,
73- )
69+ . replace_all ( & res, & b"<a class=\" src\" href=\" /__DOCSERVER_SRCLINK" [ ..] )
7470 . into_owned ( ) ;
7571 let res = re_rewrite_root. replace_all ( & res, & [ ] [ ..] ) . into_owned ( ) ;
7672 let res = re_fix_root_path
You can’t perform that action at this time.
0 commit comments