diff options
| author | bors <bors@rust-lang.org> | 2014-08-18 08:26:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-08-18 08:26:05 +0000 |
| commit | ed7a3d6f1ebc9db39a45dc6139bbcdc16b32b0a8 (patch) | |
| tree | 10e6a991b56539f4794da3ca1f5e9aadbb0c6d8a /src | |
| parent | ef439ddce0d735bf6ae6f583a76b36a22951ab28 (diff) | |
| parent | 958250c0e5144c4fb07e80eb1742d810687bd80e (diff) | |
| download | rust-ed7a3d6f1ebc9db39a45dc6139bbcdc16b32b0a8.tar.gz rust-ed7a3d6f1ebc9db39a45dc6139bbcdc16b32b0a8.zip | |
auto merge of #16556 : pczarn/rust/wbr, r=alexcrichton
Prevents zero-width spaces from appearing in copy-pasted paths. Fixes #16555
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/html/render.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index bb68c6536a0..be62b1cc36f 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1316,7 +1316,7 @@ impl<'a> fmt::Show for Item<'a> { let cur = self.cx.current.as_slice(); let amt = if self.ismodule() { cur.len() - 1 } else { cur.len() }; for (i, component) in cur.iter().enumerate().take(amt) { - try!(write!(fmt, "<a href='{}index.html'>{}</a>​::", + try!(write!(fmt, "<a href='{}index.html'>{}</a>::<wbr>", "../".repeat(cur.len() - i - 1), component.as_slice())); } @@ -1325,7 +1325,7 @@ impl<'a> fmt::Show for Item<'a> { shortty(self.item), self.item.name.get_ref().as_slice())); // Write stability level - try!(write!(fmt, "​{}", Stability(&self.item.stability))); + try!(write!(fmt, "<wbr>{}", Stability(&self.item.stability))); // Links to out-of-band information, i.e. src and stability dashboard try!(write!(fmt, "</div><div class='out-of-band'>")); @@ -2078,7 +2078,7 @@ impl<'a> fmt::Show for Sidebar<'a> { let len = cx.current.len() - if it.is_mod() {1} else {0}; for (i, name) in cx.current.iter().take(len).enumerate() { if i > 0 { - try!(write!(fmt, "​::")); + try!(write!(fmt, "::<wbr>")); } try!(write!(fmt, "<a href='{}index.html'>{}</a>", cx.root_path |
