Commit 8964f32 1 parent 6f1649e commit 8964f32 Copy full SHA for 8964f32
File tree 2 files changed +18
-16
lines changed
2 files changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -3067,15 +3067,22 @@ where
3067
3067
return ;
3068
3068
}
3069
3069
3070
- text. drain ( ..end) ;
3071
-
3072
3070
// These are sound only because the exact text that we've matched and
3073
3071
// the count thereof (i.e. "end") will precisely map to characters in
3074
3072
// the source document.
3075
- sourcepos. start . column += end;
3076
- let reference = spx. consume ( end) + 1 ;
3077
- assert_eq ! ( reference, sourcepos. start. column) ;
3078
- parent. data . borrow_mut ( ) . sourcepos . start . column += end;
3073
+ text. drain ( ..end) ;
3074
+
3075
+ let adjust = spx. consume ( end) + 1 ;
3076
+ // Do we need to account separately for the parent? I _think_ it always
3077
+ // has the same start col to begin with as `sourcepos` itself.
3078
+ assert_eq ! (
3079
+ sourcepos. start. column,
3080
+ parent. data. borrow( ) . sourcepos. start. column
3081
+ ) ;
3082
+
3083
+ // HACK: See tests::fuzz::echaw9. The paragraph doesn't exist in the source!
3084
+ sourcepos. start . column = usize:: min ( sourcepos. end . column , adjust) ;
3085
+ parent. data . borrow_mut ( ) . sourcepos . start . column = sourcepos. start . column ;
3079
3086
3080
3087
grandparent. data . borrow_mut ( ) . value =
3081
3088
NodeValue :: TaskItem ( if symbol == ' ' { None } else { Some ( symbol) } ) ;
Original file line number Diff line number Diff line change @@ -346,17 +346,12 @@ fn echaw8() {
346
346
fn echaw9 ( ) {
347
347
// fuzz/artifacts/all_options/minimized-from-8a07a44ba1f971ec39d0c14d377c78c2535c6fd5
348
348
assert_ast_match ! (
349
- [ extension. autolink , extension . tasklist] ,
349
+ [ extension. tasklist] ,
350
350
"-\t [ ]
" ,
351
- ( document ( 1 : 1 -1 : 15 ) [
352
- ( list ( 1 : 1 -1 : 15 ) [
353
- ( taskitem ( 1 : 1 -1 : 15 ) [
354
- ( paragraph ( 1 : 7 -1 : 17 ) [
355
- ( text ( 1 : 7 -1 : 13 ) "𝔛-<" )
356
- ( link
( 1 : 14 -
1 : 17 ) "mailto:[email protected] " [
357
- ( text
( 1 : 14 -
1 : 17 ) "[email protected] " )
358
- ] )
359
- ] )
351
+ ( document ( 1 : 1 -1 : 14 ) [
352
+ ( list ( 1 : 1 -1 : 14 ) [
353
+ ( taskitem ( 1 : 1 -1 : 14 ) [
354
+ ( paragraph ( 1 : 14 -1 : 14 ) ) // Unsatisfying. See parser::process_tasklist.
360
355
] )
361
356
] )
362
357
] ) ,
You can’t perform that action at this time.
0 commit comments