From 6161429363cfa9bb8fb9508cd6137fe20660951a Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Mon, 9 Jul 2012 15:13:22 -0700 Subject: [PATCH] rustdoc: Filter out another invalid id character --- src/rustdoc/markdown_index_pass.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rustdoc/markdown_index_pass.rs b/src/rustdoc/markdown_index_pass.rs index 264af1df256..6532f572c6d 100644 --- a/src/rustdoc/markdown_index_pass.rs +++ b/src/rustdoc/markdown_index_pass.rs @@ -121,6 +121,7 @@ fn pandoc_header_id(header: 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]