File tree 2 files changed +11
-86
lines changed
2 files changed +11
-86
lines changed Original file line number Diff line number Diff line change @@ -218,12 +218,7 @@ fn split_source(input: &str) -> CargoResult<Source<'_>> {
218
218
}
219
219
220
220
// Experiment: let us try which char works better
221
- let tick_char = source
222
- . content
223
- . chars ( )
224
- . filter ( |c| [ '`' , '#' , '-' ] . contains ( c) )
225
- . next ( )
226
- . unwrap_or ( '`' ) ;
221
+ let tick_char = '-' ;
227
222
228
223
let tick_end = source
229
224
. content
@@ -235,10 +230,6 @@ fn split_source(input: &str) -> CargoResult<Source<'_>> {
235
230
return Ok ( source) ;
236
231
}
237
232
1 | 2 => {
238
- if tick_char == '#' {
239
- // Attribute
240
- return Ok ( source) ;
241
- }
242
233
anyhow:: bail!( "found {tick_end} `{tick_char}` in rust frontmatter, expected at least 3" )
243
234
}
244
235
_ => source. content . split_at ( tick_end) ,
@@ -332,10 +323,10 @@ strip = true
332
323
333
324
[workspace]
334
325
"# ,
335
- si ! ( r#"``` cargo
326
+ si ! ( r#"--- cargo
336
327
[dependencies]
337
328
time="0.1.25"
338
- ```
329
+ ---
339
330
fn main() {}
340
331
"# ) ,
341
332
) ;
@@ -363,79 +354,13 @@ name = "test-"
363
354
[profile.release]
364
355
strip = true
365
356
366
- [workspace]
367
- "# ,
368
- si ! ( r#"```
369
- [dependencies]
370
- time="0.1.25"
371
- ```
372
- fn main() {}
373
- "# ) ,
374
- ) ;
375
- }
376
-
377
- #[ test]
378
- fn test_dash ( ) {
379
- snapbox:: assert_matches (
380
- r#"[[bin]]
381
- name = "test-"
382
- path = [..]
383
-
384
- [dependencies]
385
- time = "0.1.25"
386
-
387
- [package]
388
- autobenches = false
389
- autobins = false
390
- autoexamples = false
391
- autotests = false
392
- build = false
393
- edition = "2021"
394
- name = "test-"
395
-
396
- [profile.release]
397
- strip = true
398
-
399
357
[workspace]
400
358
"# ,
401
359
si ! ( r#"---
402
360
[dependencies]
403
361
time="0.1.25"
404
362
---
405
363
fn main() {}
406
- "# ) ,
407
- ) ;
408
- }
409
-
410
- #[ test]
411
- fn test_hash ( ) {
412
- snapbox:: assert_matches (
413
- r#"[[bin]]
414
- name = "test-"
415
- path = [..]
416
-
417
- [dependencies]
418
- time = "0.1.25"
419
-
420
- [package]
421
- autobenches = false
422
- autobins = false
423
- autoexamples = false
424
- autotests = false
425
- build = false
426
- edition = "2021"
427
- name = "test-"
428
-
429
- [profile.release]
430
- strip = true
431
-
432
- [workspace]
433
- "# ,
434
- si ! ( r#"###
435
- [dependencies]
436
- time="0.1.25"
437
- ###
438
- fn main() {}
439
364
"# ) ,
440
365
) ;
441
366
}
Original file line number Diff line number Diff line change @@ -210,10 +210,10 @@ fn requires_z_flag() {
210
210
#[ cargo_test]
211
211
fn clean_output_with_edition ( ) {
212
212
let script = r#"#!/usr/bin/env cargo
213
- ```cargo
213
+ ---
214
214
[package]
215
215
edition = "2018"
216
- ```
216
+ ---
217
217
218
218
fn main() {
219
219
println!("Hello world!");
@@ -241,9 +241,9 @@ fn main() {
241
241
#[ cargo_test]
242
242
fn warning_without_edition ( ) {
243
243
let script = r#"#!/usr/bin/env cargo
244
- ```cargo
244
+ ---
245
245
[package]
246
- ```
246
+ ---
247
247
248
248
fn main() {
249
249
println!("Hello world!");
@@ -714,10 +714,10 @@ fn did_you_mean_command_stable() {
714
714
fn test_name_same_as_dependency ( ) {
715
715
Package :: new ( "script" , "1.0.0" ) . publish ( ) ;
716
716
let script = r#"#!/usr/bin/env cargo
717
- ```cargo
717
+ ---
718
718
[dependencies]
719
719
script = "1.0.0"
720
- ```
720
+ ---
721
721
722
722
fn main() {
723
723
println!("Hello world!");
@@ -751,10 +751,10 @@ fn main() {
751
751
#[ cargo_test]
752
752
fn test_path_dep ( ) {
753
753
let script = r#"#!/usr/bin/env cargo
754
- ```cargo
754
+ ---
755
755
[dependencies]
756
756
bar.path = "./bar"
757
- ```
757
+ ---
758
758
759
759
fn main() {
760
760
println!("Hello world!");
You can’t perform that action at this time.
0 commit comments