File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -225,21 +225,23 @@ fn split_source(input: &str) -> CargoResult<Source<'_>> {
225
225
}
226
226
227
227
// Experiment: let us try which char works better
228
- let tick_char = '-' ;
228
+ let fence_char = '-' ;
229
229
230
- let tick_end = source
230
+ let fence_end = source
231
231
. content
232
232
. char_indices ( )
233
- . find_map ( |( i, c) | ( c != tick_char ) . then_some ( i) )
233
+ . find_map ( |( i, c) | ( c != fence_char ) . then_some ( i) )
234
234
. unwrap_or ( source. content . len ( ) ) ;
235
- let ( fence_pattern, rest) = match tick_end {
235
+ let ( fence_pattern, rest) = match fence_end {
236
236
0 => {
237
237
return Ok ( source) ;
238
238
}
239
239
1 | 2 => {
240
- anyhow:: bail!( "found {tick_end} `{tick_char}` in rust frontmatter, expected at least 3" )
240
+ anyhow:: bail!(
241
+ "found {fence_end} `{fence_char}` in rust frontmatter, expected at least 3"
242
+ )
241
243
}
242
- _ => source. content . split_at ( tick_end ) ,
244
+ _ => source. content . split_at ( fence_end ) ,
243
245
} ;
244
246
let ( info, content) = rest. split_once ( "\n " ) . unwrap_or ( ( rest, "" ) ) ;
245
247
if !info. is_empty ( ) {
You can’t perform that action at this time.
0 commit comments