Skip to content

Commit 6c92920

Browse files
committed
---
yaml --- r: 30719 b: refs/heads/incoming c: c675cd3 h: refs/heads/master i: 30717: c80faa9 30715: 76ad6e0 30711: d6a58e3 30703: 537d31e 30687: 7c7140d 30655: 0169c36 30591: 893a1a9 30463: e17c8be 30207: a02edb7 29695: 1c16e97 28671: a10e1de v: v3
1 parent 601a6f6 commit 6c92920

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: 991cbfe42c8836e8b4adfcaf288d5c0b8d57397c
9+
refs/heads/incoming: c675cd396d729ad7e427abd370489767a0db6ab6
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/rustdoc/markdown_index_pass.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,12 @@ fn pandoc_header_id(header: ~str) -> ~str {
127127
return s;
128128
}
129129
fn replace_with_hyphens(s: ~str) -> ~str {
130-
str::replace(s, ~" ", ~"-")
130+
// Collapse sequences of whitespace to a single dash
131+
// XXX: Hacky implementation here that only covers
132+
// one or two spaces.
133+
let s = str::replace(s, ~" ", ~"-");
134+
let s = str::replace(s, ~" ", ~"-");
135+
return s;
131136
}
132137
fn convert_to_lowercase(s: ~str) -> ~str { str::to_lower(s) }
133138
fn remove_up_to_first_letter(s: ~str) -> ~str { s }
@@ -144,6 +149,8 @@ fn should_remove_punctuation_from_headers() {
144149
== ~"impl-of-numnum-for-int";
145150
assert pandoc_header_id(~"impl of num::num for ^int")
146151
== ~"impl-of-numnum-for-int";
152+
assert pandoc_header_id(~"impl for & condvar")
153+
== ~"impl-for-condvar";
147154
}
148155

149156
#[test]

0 commit comments

Comments
 (0)