File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 57af1e9f67082e41e62aa977754f2df5f78e403c
2
+ refs/heads/master: d54d9b1cab0555140608852164b69c936ada63ce
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
5
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
Original file line number Diff line number Diff line change @@ -86,6 +86,12 @@ fn pandoc_header_id(header: str) -> str {
86
86
fn remove_punctuation ( s : str ) -> str {
87
87
let s = str:: replace ( s, "<" , "" ) ;
88
88
let s = str:: replace ( s, ">" , "" ) ;
89
+ let s = str:: replace ( s, "[" , "" ) ;
90
+ let s = str:: replace ( s, "]" , "" ) ;
91
+ let s = str:: replace ( s, "(" , "" ) ;
92
+ let s = str:: replace ( s, ")" , "" ) ;
93
+ let s = str:: replace ( s, "@" , "" ) ;
94
+ let s = str:: replace ( s, "~" , "" ) ;
89
95
ret s;
90
96
}
91
97
fn replace_with_hyphens ( s : str ) -> str {
@@ -97,8 +103,9 @@ fn pandoc_header_id(header: str) -> str {
97
103
}
98
104
99
105
#[ test]
100
- fn should_remove_brackets_from_headers ( ) {
106
+ fn should_remove_punctuation_from_headers ( ) {
101
107
assert pandoc_header_id ( "impl foo of bar<A>" ) == "impl-foo-of-bara" ;
108
+ assert pandoc_header_id ( "fn@([~A])" ) == "fna" ;
102
109
}
103
110
104
111
#[ test]
You can’t perform that action at this time.
0 commit comments