Implement the new fields for bullshitium broken dynamic block.
This commit is contained in:
		
							parent
							
								
									c28d8ccea4
								
							
						
					
					
						commit
						f5280a3090
					
				| @ -124,6 +124,7 @@ pub(crate) fn broken_dynamic_block<'b, 'g, 'r, 's>( | ||||
|         match paragraph.children.first_mut() { | ||||
|             Some(Object::PlainText(plain_text)) => { | ||||
|                 plain_text.source = input.get_until_end_of_str(plain_text.source).into(); | ||||
|                 paragraph.contents = Some(input.get_until_end_of_str(plain_text.source).into()); | ||||
|             } | ||||
|             Some(obj) => { | ||||
|                 panic!("Unhandled first object type inside bullshitium {:?}", obj); | ||||
| @ -134,14 +135,18 @@ pub(crate) fn broken_dynamic_block<'b, 'g, 'r, 's>( | ||||
|         }; | ||||
|         Ok((remaining, paragraph)) | ||||
|     } else { | ||||
|         let (remaining, _trailing_ws) = | ||||
|         let (remaining, post_blank) = | ||||
|             maybe_consume_trailing_whitespace_if_not_exiting(context, lead_in_remaining)?; | ||||
| 
 | ||||
|         let body = Into::<&str>::into(input.get_until(lead_in_remaining)); | ||||
| 
 | ||||
|         Ok(( | ||||
|             remaining, | ||||
|             Paragraph::of_text( | ||||
|             Paragraph::of_text_full( | ||||
|                 input.get_until(remaining).into(), | ||||
|                 input.get_until(lead_in_remaining).into(), | ||||
|                 body, | ||||
|                 if body.len() > 0 { Some(body) } else { None }, | ||||
|                 post_blank.map(Into::<&str>::into), | ||||
|             ), | ||||
|         )) | ||||
|     } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander