提交 61614293 编写于 作者: B Brian Anderson

rustdoc: Filter out another invalid id character

上级 2d1ca984
......@@ -121,6 +121,7 @@ fn remove_punctuation(s: str) -> str {
let s = str::replace(s, "/", "");
let s = str::replace(s, ":", "");
let s = str::replace(s, "&", "");
let s = str::replace(s, "^", "");
ret s;
}
fn replace_with_hyphens(s: str) -> str {
......@@ -139,6 +140,8 @@ fn should_remove_punctuation_from_headers() {
== "impl-of-numnum-for-int";
assert pandoc_header_id("impl of num::num for int/&")
== "impl-of-numnum-for-int";
assert pandoc_header_id("impl of num::num for ^int")
== "impl-of-numnum-for-int";
}
#[test]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册