File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -714,13 +714,18 @@ impl<'self> fmt::Default for Item<'self> {
714
714
do clean_srcpath ( it. item . source . filename ) |component| {
715
715
path. push ( component. to_owned ( ) ) ;
716
716
}
717
+ let href = if it. item . source . loline == it. item . source . hiline {
718
+ format ! ( "{}" , it. item. source. loline)
719
+ } else {
720
+ format ! ( "{}-{}" , it. item. source. loline, it. item. source. hiline)
721
+ } ;
717
722
write ! ( fmt. buf,
718
723
"<a class='source'
719
- href='{root}src/{crate}/{path}.html\\ #{line }'>[src]</a>" ,
724
+ href='{root}src/{crate}/{path}.html\\ #{href }'>[src]</a>" ,
720
725
root = it. cx. root_path,
721
726
crate = it. cx. layout. crate ,
722
727
path = path. connect( "/" ) ,
723
- line = it . item . source . loline ) ;
728
+ href = href ) ;
724
729
}
725
730
726
731
// Write the breadcrumb trail header for the top
You can’t perform that action at this time.
0 commit comments